| Complexity | Research | Tcl/Tk | Local interest | Alphatk | Mac | Cpptcl | ||
| Thesis | Canyons | Downloads | Bibliographies | MacBibTeX | Pltk | Search |
In order of priority, this is what Cpptcl does:
The primary purpose of Cpptcl is to allow you to write C++ code and classes which smoothly, simply and powerfully link with the Tcl language, and expose as much or little of their interface to Tcl as desired (member functions and data members). Object creation, destruction and manipulation are all supported from Tcl. Also the C++-Tcl interface uses a lot of the powerful features of the C++ language to make your code much more straightforward than if you were to use the standard Tcl C API. Building and manipulation of strings, lists, evaluations,... is all possible using stream based operators, so you can do things like:
tcl_obj t;
t << "store this string" << my_var << " which contains a C variable value";
tcl_obj tt(interp);
tt << "puts {" << t << "}" << eval;
A secondary goal is to allow you to take existing C++ classes and
automatically wrap them inside other 'Tcl-aware' C++ classes so that
it appears to the Tcl user as if your original class is integrated with
Tcl.
A tertiary goal is to allow you to take either of the above forms of C++ in Tcl object functionality and wrap such an item inside an [incr Tcl] class. This occurs at the Tcl rather than C++ level, although needn't look any different to the user.
Download CppTcl 2.0source code (requires tcl/tk 8.0 or newer).
Complete documentation for the class hierarchy is available on line, which contains some tutorial items. There is also some demonstration code in the Cpptcl package, which also has good documentation on-line. As of version 1.30, Cpptcl fully supports Tcl8.0, making complete use of the internal 'Tcl_Obj' representation, so all C++-Tcl communication using Cpptcl is significantly faster. Cpptcl is known to work fine under Solaris, MacOS and Windows operating systems.
You can also look at a list of recent changes, in case you're thinking of upgrading to a newer version of Cpptcl. There is also some older, more general documentation about the entire EvoX system on line.
If you want to look at some more code examples of how to use Cpptcl, just download the EvoX simulation system.
You can have a look at the interface general documentation, or more detailed programmer's documentation and class hierarchy.
Download EvoX 1.1 source code.
EvoX is a triplet of loadable Tcl extensions which work fine under Unix and MacOS (and presumably other platforms too).
Mail me:vince@santafe.edu, or go back to top, or return to the main menu.