#ifndef __TclNamedReference_h_ #define __TclNamedReference_h_ #include #include "NamedReference.h" /* This is a wrapper around NamedReference.h. The idea is to create a TCL * object which points to a C++ object. NamedReference offers a reference * count, so multiple TCL objects and multiple C++ variables can all point to * the same object, and it will be garbage collected correctly. NamedReference * includes a globally unique name for the object. This allows TCL to convert * a string (the name of one of these objects) into a pointer to the correct * object. * * NamedReference.h was written specifically to work with TCL in this way. * NamedReference.h does not reference TCL at all, so the code could be used * in other places. */ Tcl_Obj *createTclObject(NamedReference const &ref); // interp is where we set the error message. It can be NULL. NamedReference extractNamedReference(Tcl_Obj* obj, Tcl_Interp *interp); void reportNotApplicableError(Tcl_Interp *interp, NamedReference const &namedReference, std::string const &expecting); void installNamedReferenceDebugCommands(Tcl_Interp *interp); #endif