FRIBParallelanalysis
1.0
FrameworkforMPIParalleldataanalysisatFRIB
|
#include <TCLPackagedObjectProcessor.h>
Public Member Functions | |
CTCLPackagedObjectProcessor (CTCLInterpreter &interp, std::string command, bool registerMe=true) | |
virtual | ~CTCLPackagedObjectProcessor () |
void | onAttach (CTCLObjectPackage *package) |
![]() | |
CTCLObjectProcessor (CTCLInterpreter &interp, std::string name, bool registerMe=true) | |
virtual | ~CTCLObjectProcessor () |
void | Register () |
Tcl_Command | RegisterAs (std::string name) |
void | unregister () |
void | unregisterAs (Tcl_Command token) |
std::string | getName () const |
Tcl_CmdInfo | getInfo () const |
![]() | |
CTCLInterpreterObject (CTCLInterpreter *pInterp) | |
CTCLInterpreterObject (const CTCLInterpreterObject &aCTCLInterpreterObject) | |
CTCLInterpreterObject & | operator= (const CTCLInterpreterObject &aCTCLInterpreterObject) |
int | operator== (const CTCLInterpreterObject &aCTCLInterpreterObject) const |
CTCLInterpreter * | getInterpreter () const |
CTCLInterpreter * | Bind (CTCLInterpreter &rBinding) |
CTCLInterpreter * | Bind (CTCLInterpreter *pBinding) |
Protected Member Functions | |
CTCLObjectPackage * | getPackage () |
virtual void | Initialize () |
![]() | |
virtual int | operator() (CTCLInterpreter &interp, std::vector< CTCLObject > &objv)=0 |
virtual void | onUnregister () |
void | bindAll (CTCLInterpreter &interp, std::vector< CTCLObject > &objv) |
void | requireAtLeast (std::vector< CTCLObject > &objv, unsigned n, const char *msg=0) const |
void | requireAtMost (std::vector< CTCLObject > &objv, unsigned n, const char *msg=0) const |
void | requireExactly (std::vector< CTCLObject > &objv, unsigned n, const char *msg=0) const |
![]() | |
CTCLInterpreter * | AssertIfNotBound () |
A packaged command is one that has at its disposal the services of some shared set of functions (its package). This class is the base class for all such commands.
In normal usage, the user derives the actual desired class from this. The life of a pacakged command is versy similar to any object command, however at some point it is attached to the package and its onAttach member is invoked to ensure access to the package object.
CTCLPackagedObjectProcessor::CTCLPackagedObjectProcessor | ( | CTCLInterpreter & | interp, |
std::string | command, | ||
bool | registerMe = true |
||
) |
Construction passes on to the base class:
interp | - TCL Interpreter on which this command will be defined. |
command | - Name of the command. |
registerMe | - If true, construction registers the command. |
|
virtual |
Destruction is a NOOP:
|
protected |
Return the package pointer so that derived classes can invoke package facilities
|
protectedvirtual |
Default initialize is null. The derived class can override this however:
Reimplemented in testCommand.
void CTCLPackagedObjectProcessor::onAttach | ( | CTCLObjectPackage * | package | ) |
Attachment saves the package pointer for later and invokes the Initialize method (which can get the package via getPackage if it needs.
package | - Pointer to the package. |