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

#include <TCLCompatibilityProcessor.h>

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

Public Member Functions

 CTCLCompatibilityProcessor (CTCLProcessor &actualCommand)
 
virtual ~CTCLCompatibilityProcessor ()
 
virtual int operator() (CTCLInterpreter &interp, std::vector< CTCLObject > &objv)
 
virtual void onUnregister ()
 
- 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)
 

Additional Inherited Members

- Protected Member Functions inherited from CTCLObjectProcessor
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

This is an adapter pattern class between object based commands and the classic argc/argv command interface. See the CTCLProcessor class for more information. The idea is that a CTCLProcessor will contain one of these which will marshall the object interface parameters to the argc/argv interface, create at CTCLResult object and then dispatch to the CTCLProcessor so that old commands written using the argc/argv interface can continue to work even if Tcl 9.0 deprecates or even eliminates this interface.

Constructor & Destructor Documentation

◆ CTCLCompatibilityProcessor()

CTCLCompatibilityProcessor::CTCLCompatibilityProcessor ( CTCLProcessor actualCommand)

Construct the object. The assumption is that the CTCL processor is constructed 'enough' that we can pull out the command name, and the interpreter from it.

Parameters
actualCommand: CTCLProcessor Object that implements an old style argc/argv command.
Note
the CTCLProcessor required a two-step construct/register, we enforce that by not allowing the base class constructor to register us.

◆ ~CTCLCompatibilityProcessor()

CTCLCompatibilityProcessor::~CTCLCompatibilityProcessor ( )
virtual

Destruction is all taken care of by the base class destructor.

Member Function Documentation

◆ onUnregister()

void CTCLCompatibilityProcessor::onUnregister ( )
virtual

Adapt to actual commands command deletion handler.

Reimplemented from CTCLObjectProcessor.

◆ operator()()

int CTCLCompatibilityProcessor::operator() ( CTCLInterpreter interp,
std::vector< CTCLObject > &  objv 
)
virtual

Called to execute the command. Here's where the serious adaptor work comes in to play. We need to turn the objects passed in to us into an argc/argv pair, and create a CTCLResult to give the command we're adapting for.

Parameters
interp: CTCLInterpreter& Interpreter that's running this command
objv: vector<CTCLOBject>& Reference to the vector of command line objects.
Returns
int
Return values
fromm_ActualCommand->operator()

Implements CTCLObjectProcessor.


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