## -*-Text-*-
# ###################################################################
# Cpptcl - integrating C++ with Tcl
#
# FILE: "CpptclChanges.html"
# created: 24/5/96 {10:30:36 am}
# last update: 08/20/98 {12:07:02 PM}
# Author: Vince Darley
# E-mail:
# mail: Division of Applied Sciences, Harvard University
# Oxford Street, Cambridge MA 02138, USA
# www:
#
# ###################################################################
##
To Do:
*) File-name configuration options don't deal with command completion.
So if I do:
object configure -Input_file ~/data/filen
it won't complete.
*) Construction configuration options: currently can do 'create name ...'
it would be nice to allow 'create ?-flags...? name ...' as well.
Recent Changes:
20/8/98 Version 2.0 final released. Runs fine on Windows, Unix and MacOS,
although compilation can be a pain since I don't have a sophisticated
installation/configuration procedure. It is known to compile with
gcc2.7.2, gcc2.8 and Metrowerks Codewarrior (Pro 1).
Numerous bug fixes and enhancements since previous releases. Requires
Tcl8.0. I suggest the latest 8.0.3 release.
--to be released version 1.90--
30/10/97 Subcommands can be added to cpp objects, using a new 'cppmeta
ensemble' command.
22/10/97 Cpptclextra as it used to be is defunct now. Cpptcl takes over
its functionality.
Data members and methods can now be accessed through Tcl directly.
Requires the user to declare a static array of pointers to members
for each class to be used in that way. Many improvements
22/10/97 Major rewrite of lots of Cpptcl. Supports Tcl8.0 only.
Backwards compatibility for Tcl7.6 no longer included.
--pre-released version 1.40--
14/10/97 Subcommand overloading implemented. Subcommands of a cpptcl
object can now take different sets of parameters. This works
by using a next_arg("type") statement to say what type of
argument should follow.
8/10/97 Fixed two crashing problems (due to tcl8.0beta -> tcl8.0final changes)
8/10/97 Implemented two completion things (below). Both of these only took
a few lines of code (and one extra method), which seems to indicate
the tcl_args class is pretty flexible and powerful.
8/10/97 auto-completion of partial commands (like unknown), so if you type
'cpptcl w', it is interpreted as cpptcl webPage (the unique completion)
The procedure cpx::abbreviation controls this behaviour. You can
toggle the variable cpx::auto_complete to switch it off.
The completion process requires a second pass through the
parse_tcl_command routines of your object (the first pass fails).
It is therefore slower.
8/10/97 you can embed command abbreviations in your code. Be careful if
an abbreviation matches, following items cannot, so the abbreviations
should not over-ride following full commands.
--released version 1.30--
21/7/97 Many changes: updated for tcl8.0b2, including namespace support. No
longer backwards compatible with tcl7.6. Sped a few things up,
including better support for Tcl_Obj's. Improved the library of .tcl
scripts.
4/6/97 Updated for tcl8.0b1 --- a few api's changed. Improved the tcl_obj
wrapper class somewhat.
30/1/97 Rewrite of list class so it's much more memory efficient (derived
from a void* class so there no code duplication).
26/1/97 Changes for tcl8.0a2 api compatibility. Couple of minor
improvements to cpptclextra library, allowing the cast of
info_source_var's to T&'s. Fixes to result-synchronisation with
tcl8. Code much clearer and robust now. Incompatible semantic
change with non Tcl8 version: the Tcl result must now be set
explicity. Previously if you used 'lappend' or 'append'
manipulators that wasn't required. When using Tcl8, iostreams are
no longer used, since everything is wrapped around Tcl_Obj's.
27/12/96 Works efficiently with Tcl8.0. Still some refinements to be made,
but it does integrate with the Tcl compiler reasonably well, and
your 'Cpptcl' scripts should run faster under the compiler than they
did before (with no changes to your C++ source code at all). The new
Tcl_Obj's are now used almost everywhere internally, which required
quite extensive rewriting of the 'tcl_args' and 'tcl_obj' classes.
One benefit is that the C++ 'strstream' classes are no longer required,
which cuts down on code and memory overhead.
20/12/96 Minor fix to a couple of error messages when configuring items.
Improvements and additions to Tcl library procedures.
--released version 1.20--
13/12/96 Added a proc to display the contents of a C++ object in a window.
For the moment it is very simple, not even allowing you to edit
the values of data members (the EvoX system has a powerful GUI,
some of which I'm gradually relaxing to require just Cpptclextra).
9/12/96 The cpparse.tcl scripts work reasonably well now. You can parse
C++ classes and create cpptcl wrappers for them without any source
code modification. See the files 'cpxTutorial.c/h' for details.
Added the 'info_source_ref_fn' source type for easier integration
of existing C++ classes. Few minor fixes elsewhere.
8/12/96 Added option '-withargs' to 'cpptcl complete'. Now completions
can list subsequent arguments as well as the basic completion.
Here's the difference:
% cpptcl complete -withargs cpptclControl
Completions:
cpptclControl commandFor type
cpptclControl hasDescendants type
cpptclControl isa type1 type2
cpptclControl listAncestry type
cpptclControl listDescendants type
cpptclControl listParents type
cpptclControl listTypes ?fromType?
cpptclControl rename newName
% cpptcl complete cpptclControl
Completions:
cpptclControl commandFor
cpptclControl hasDescendants
cpptclControl isa
cpptclControl listAncestry
cpptclControl listDescendants
cpptclControl listParents
cpptclControl listTypes
cpptclControl rename
%
Simplified internals of object creation through 'tcl_class', so
command completion works there too.
Added the 'tcl_args::match_into' public member function which
forces a match of whatever's next, reading the argument into the
given variable. Any errors/completions are dealt with correctly.
4/12/96 Configuration of boolean member variables is more sophisticated
now. I use the Tcl_GetBoolean function so you can read from 0, 1,
true, false, yes, no,É
Added a few more demonstration classes.
2/12/96 Minor changes for improved compatibility with Itcl 2.2 as well
as Itcl 2.1
22/11/96 Improvements to some internal library search procedures so that
you can find your library files more easily and robustly on all
Tcl platforms.
8/11/96 Small bug-fixes to configuration of boolean values.
--released version 1.1--
24/7/96 Some minor changes to remove a couple of warnings, and fix
compilation of some obscure argument templates.
23/7/96 Information configuration option command completion implemented.
Simplified a bunch of code as a result. Fixed so configuration
options get archived if desired.
22/7/96 The argument parsing class has a few new methods to peek
ahead on the argument list and check if an argument is of
type 'int', 'float' or 'string'. This can be useful if
your commands need some sort of decision process in the
way in which they parse their arguments.
20/7/96 Cpptcl now loads a 'cpptcl.tcl' library file by default.
This is partly useful, and partly to show you how to use
a new feature of the tcl_obj class which can locate
your library files for you (if you use Itcl --- if you don't,
just set the compiler flag 'NO_ITCL' and the new code will
vanish).
20/7/96 Quite major changes. Moved the metaobject functionality from
Cpptclextra into Cpptcl. Now the creation of any C++ object
is best handled through the metaobject. It can keep track of
your hierarchy, answer questions about it, and create objects
of specified types very easily. Backwards compatibible in
almost all respects.
Archival of object creation (if desired), and status/error
messages are handled by a split-off 'recordkeeper' object,
rather than by the metaobject as before.
Made the Cpptcl API more explicit.
8/7/96 Removed defunct method 'operator ||' from class tcl_args
--released version 1.03--
5/7/96 Added a new procedure 'Cpptcl_PkgInit' which you can use
to simplify your init procedure. See the Cpptclextra init
for an example.
5/7/96 Added more comments to the demo, and put it on-line
5/7/96 Put in decent error messages for setting of options with
values which aren't in range. So you now get:
% cpptclControl configure -Status_alert_level 11
read partial cmd 'cpptclControl configure -Status_alert_level'
but failed to convert next argument '11'to the range: [-1,10];
syntax should be 'cpptclControl configure -Status_alert_level value'
%
5/7/96 Fixed 'obj configure -Input_file "Name with spaces"' so it
works (good on MacOS where we can have filenames with spaces)
29/6/96 Added demo, and fixed some stuff in configure/makefile
--released version 1.02--
28/6/96 Changed name of file 'cpptclextra_objects' to 'cpptclextra_init'
for consistency.
27/6/96 Now check for limits on observables whose limits are declared
(e.g. cpptclControl:Status_alert_level = -2 gives an error)
The error messages for these are currently rather poor.
26/6/96 Added a utility procedure 'documentObject' which extracts
help text on a cpptcl object's commands. e.g.
% documentObject cpptcl
cpptcl author : name and e-mail address for bug reports
cpptcl complete : complete a command on a Cpptcl object
cpptcl isCpptcl : is this a Cpptcl object
cpptcl maxCompletion : return maximum length common prefix for last completion
cpptcl origCommand : return length of command which was completed
cpptcl rename : changes the Tcl command name of the object
cpptcl webPage : web page for online documentation
In doing so, fixed a few cosmetic bugs in the C++ code.
25/6/96 Neatened a few things so some lists which are returned are sorted
alphabetically (e.g. 'Toaster configure')
25/6/96 Object configuration options are checked after construction,
so you can do 'Toaster t -size 5 -color Green -output t.txt'
to construct and configure an object. This works for contained
observables and files (input or output).
If configuration fails, the object is still constructed, but
an error message will be signalled. Configure options are parsed
in a left-to-right fashion, terminating on an error.
25/6/96 Added checking for sub-object commands so you can now do:
cpptclControl:Status_alert_level = 0
or
cpptclControl Status_alert_level = 0
i.e. if a sub-object exists with the given name, it is sent
the command. Potential problems are that a sub-object could
over-ride the parent's command in this way. Also I currently
do not add sub-object names to the 'arg' error message so
'cpptclControl ' will not list the sub-objects as possible
commands (easy to change but perhaps not desired). Feedback
is most welcome!
The basic purpose of this is so that ultimately 'cpptclControl:St..'
does not exist at the top level; i.e. my objects will become like
namespaces. I need to look into the details of this a bit more.
--released version 1.0--
21/6/96 Added command completion to the 'cpptcl' package, and made it
a real Tcl package. Major improvement! Separated 'cpptcl' from
the rest of the evox system.
21/6/96 Many minor changes including partial re-integration of the old
Tcl/Tk interface. Now some of it works with Itcl2.1/Itk/...
24/5/96 Now use DOC++ for automatic documentation generation. See my web
pages for the results. A bit more documentation is required, but
this tool makes it all a lot easier.
12/5/96 Significant changes to the info_source_XXX hierarchy, although
no changes are visible to user-code. I did this to allow a bit
more flexibility in declaring sources, so that C++-Tcl interfaces
can be generated automatically in the future.
30/4/96 A few simplifications to 'tcl_args' allowing the direct reading
of more classes from the argument list. Itemised variables now
read and write with their names (they are like 'enum' in C). For
backwards compatibility they will read from numbers too.
23/4/96 Various more C++-incompatible changes which make for a much simpler
procedure for construction and manipulation of objects from the
Tcl interface, and allow your C++ code to have far fewer checks
in it.
19/4/96 Added function 'Cpptclextra_Init' which loads in just the
two libraries 'Cpptclextra' and 'Cpptcl', creating a new
object 'cpptclControl' in the process.
19/4/96 Improved the parsing system immensely. It now works whether
or not excepting handling is supported. The only disadvantage
if you don't use exception handling is that objects constructed
unnecessarily (after an error has been thrown) may not be
destroyed, thus wasting memory. However, such situations need
not arise with careful coding. C++/Tcl interfaces are now
trivially self-documenting! Tested using gcc2.7.2 and CW8.
Totally backwards-incompatible (at the C++ level; old scripts will
still work), but thankfully so!
16/4/96 Beginnings of a better system for parsing tcl commands. It's
much more typical of C++, and makes for simpler user coding.
The only drawback is that it requires exceptions (v. v. simple
ones, but exception nonetheless). I'll retain backwards
compatibility until g++ supports my new code.
========
History:
Various releases from 1994 to early 1996 to individuals for research purposes.