Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

src/aclvis/InterpTcl.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /***************************************************************************
00003  *
00004  * The IPPL Framework
00005  * 
00006  *
00007  * Visit http://people.web.psi.ch/adelmann/ for more details
00008  *
00009  ***************************************************************************/
00010 
00011 #ifndef ACLVIS_INTERP_TCL_H
00012 #define ACLVIS_INTERP_TCL_H
00013 
00014 // include files
00015 #include "aclvis/Interp.h"
00016 #include "aclvis/InterpCmd.h"
00017 #include <tcl.h>
00018 
00019 
00020 class InterpTcl : public Interp {
00021 
00022 public:
00023   // Constructor - nm is the name of the interpreter, and is used
00024   // as the string presented at the prompt (if you want a >, as in
00025   // cmd>, you must include it in the name)
00026   InterpTcl(const char *);
00027 
00028   // Destructor
00029   virtual ~InterpTcl();
00030 
00031   // Add a new command callback to the interpreter, by providing a InterpCmd.
00032   virtual void addCommand(InterpCmd&);
00033 
00034   // Take the given string and have the interpreter evaluate it as a command.
00035   // Return true if OK, false if an error occurred.
00036   virtual bool evalCommand(const char *);
00037 
00038   // Bind a given variable to the given string variable name ... modifying
00039   // the interpreter variable should then modify the bound variable.
00040   // This is available for integer and double variables.
00041   virtual void bindVar(const char *, int &);
00042   virtual void bindVar(const char *, double &);
00043 
00044 private:
00045   // The TCL interpreter context
00046   Tcl_Interp *interp;
00047 };
00048 
00049 #endif // ACLVIS_INTERP_TCL_H
00050 
00051 /***************************************************************************
00052  * $RCSfile: InterpTcl.h,v $   $Author: adelmann $
00053  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:34 $
00054  * IPPL_VERSION_ID: $Id: InterpTcl.h,v 1.1.1.1 2003/01/23 07:40:34 adelmann Exp $ 
00055  ***************************************************************************/

Generated on Fri Nov 2 01:25:53 2007 for IPPL by doxygen 1.3.5