FRIBParallelanalysis  1.0
FrameworkforMPIParalleldataanalysisatFRIB
Public Member Functions | Protected Member Functions | List of all members
CTCLPackagedObjectProcessor Class Reference

#include <TCLPackagedObjectProcessor.h>

Inheritance diagram for CTCLPackagedObjectProcessor:
Inheritance graph
[legend]
Collaboration diagram for CTCLPackagedObjectProcessor:
Collaboration graph
[legend]

Public Member Functions

 CTCLPackagedObjectProcessor (CTCLInterpreter &interp, std::string command, bool registerMe=true)
 
virtual ~CTCLPackagedObjectProcessor ()
 
void onAttach (CTCLObjectPackage *package)
 
- Public Member Functions inherited from CTCLObjectProcessor
 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
 
- Public Member Functions inherited from CTCLInterpreterObject
 CTCLInterpreterObject (CTCLInterpreter *pInterp)
 
 CTCLInterpreterObject (const CTCLInterpreterObject &aCTCLInterpreterObject)
 
CTCLInterpreterObjectoperator= (const CTCLInterpreterObject &aCTCLInterpreterObject)
 
int operator== (const CTCLInterpreterObject &aCTCLInterpreterObject) const
 
CTCLInterpretergetInterpreter () const
 
CTCLInterpreterBind (CTCLInterpreter &rBinding)
 
CTCLInterpreterBind (CTCLInterpreter *pBinding)
 

Protected Member Functions

CTCLObjectPackagegetPackage ()
 
virtual void Initialize ()
 
- Protected Member Functions inherited from CTCLObjectProcessor
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
 
- Protected Member Functions inherited from CTCLInterpreterObject
CTCLInterpreterAssertIfNotBound ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CTCLPackagedObjectProcessor()

CTCLPackagedObjectProcessor::CTCLPackagedObjectProcessor ( CTCLInterpreter interp,
std::string  command,
bool  registerMe = true 
)

Construction passes on to the base class:

Parameters
interp- TCL Interpreter on which this command will be defined.
command- Name of the command.
registerMe- If true, construction registers the command.

◆ ~CTCLPackagedObjectProcessor()

CTCLPackagedObjectProcessor::~CTCLPackagedObjectProcessor ( )
virtual

Destruction is a NOOP:

Member Function Documentation

◆ getPackage()

CTCLObjectPackage * CTCLPackagedObjectProcessor::getPackage ( )
protected

Return the package pointer so that derived classes can invoke package facilities

Returns
CTCLObjectPackage*

◆ Initialize()

void CTCLPackagedObjectProcessor::Initialize ( )
protectedvirtual

Default initialize is null. The derived class can override this however:

Reimplemented in testCommand.

◆ onAttach()

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.

Parameters
package- Pointer to the package.

The documentation for this class was generated from the following files: