This directory contains all the examples I currently have available.  
These are:

Demoone:

	An example of an object 'Toaster' which uses the Cpptclextra package, 
	with a single data member and member function which interface with Tcl.

    Add the following line to your pkgIndex.tcl to use in the simplest
    way:
    
	package ifneeded Demoone 0.1 [list load [file join $dir libDemoone] Demoone]
	
	Move the file 'demoone.tcl' into a new directory 'demoone0.1' at
	the same level as the tcl7.6, tk4.2 library directories in your
	hierarchy.
	
Demotwo:
	
	A very simple object 'Basic_object' which uses the Cpptcl package, but 
	nothing more.  It's a good example of how you can use Cpptcl to attach 
	Tcl to a given C++ object, and how to link things up so you can create 
	objects, call their methods, and delete them.  Cpptcl provides error 
	messages, help text, command completion and control over the object 
	hierarchy.
	
Demothree:
	
	A simple C++ object which uses Cpptcl, but which needs a wrapper object 
	to interface with Tcl.  This is the case when you already have a C++ 
	class hierarchy, and you wish to wrap those classes inside others rather 
	than editing the original source code.
	
	Currently not available (sorry, but see below for wrapping details).

Demofour:
	
	Creates the 'Siteswap' object which is actually reasonably useful to a 
	small segment of the population: jugglers.  This object can list all
	juggling patterns known as "siteswaps" with a specified number of balls,
	period, multiplex factor and rhythm.  
	
-----------------------------------------------------------------------------

Wrapping existing classes

See 'cpxTutorial.h'

This file contains four different, simple C++ classes which can be 
automatically wrapped into Cpptcl objects.  To do this, do the 
following:
	
tclsh
% package require Cpptcl
1.2
% cppp_parse_class cpxTutorial.h

Choose an appropriate name for the package ('Cpxtutorial' is fine).
Then do 'make tutorial', and start-up tclsh again.

tclsh
% package require Cpptclextra
1.2
% load libCpxtutorial
1.0

There are now four new commands A, B, C and D, which create objects of 
the four classes given in 'cpxTutorial.h'!  Their member functions are
now accessible from Tcl, and useful error messages, help text, ...
are all there, with no effort!

-----------------------------------------------------------------------------

Further examples:

The entire EvoX package is obviously a large, complex demonstration of how 
to use Cpptcl.  However the class hierarchy is quite deep, and interwoven, 
so perhaps it is not the clearest example.

For some simple examples, have a look at the class 'cpptcl_control'.  This 
is part of the 'Cpptcl' library and implements the command completion 
interface, plus a couple of simple commands.  It is a simple example of how 
to derive a class from 'tcl_object' --- i.e.  how to use the library 
'Cpptcl', but _not_ Cpptclextra.

Other simple classes worth looking at are 'record_keeper' in Cpptclextra, 
and the 'data_pipe' hierarchy in Evoxlib.

