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

Public Member Functions

 CTCLInterpreter (Tcl_Interp *am_pInterpreter)
 
int operator== (const CTCLInterpreter &aCTCLInterpreter)
 
Tcl_Interp * getInterpreter ()
 
std::string Eval (const char *pScript)
 
std::string Eval (const CTCLString &rScript)
 
std::string Eval (const std::string &rScript)
 
std::string EvalFile (const char *pFilename)
 
std::string EvalFile (const CTCLString &rFilename)
 
std::string EvalFile (const std::string &rFilename)
 
std::string GlobalEval (const char *pScript)
 
std::string GlobalEval (const CTCLString &rScript)
 
std::string GlobalEval (const std::string &rScript)
 
std::string RecordAndEval (const char *pScript, TCLPLUS::Bool_t fEval=TCLPLUS::kfFALSE)
 
std::string RecordAndEval (const CTCLString &rScript, TCLPLUS::Bool_t fEval=TCLPLUS::kfFALSE)
 
std::string RecordAndEval (const std::string &rScript, TCLPLUS::Bool_t fEval=TCLPLUS::kfFALSE)
 
std::string ExprString (const char *pExpression)
 
std::string ExprString (const CTCLString &rExpr)
 
std::string ExprString (const std::string &rExpr)
 
TCLPLUS::Long_t ExprLong (const char *pExpression)
 
TCLPLUS::Long_t ExprLong (std::string &rExpression)
 
TCLPLUS::Long_t ExprLong (const CTCLString &rExpr)
 
TCLPLUS::DFloat_t ExprDouble (const char *pExpression)
 
TCLPLUS::DFloat_t ExprDouble (const CTCLString &rExpression)
 
TCLPLUS::DFloat_t ExprDouble (const std::string &rExpression)
 
TCLPLUS::Bool_t ExprBoolean (const char *pExpression)
 
TCLPLUS::Bool_t ExprBoolean (const CTCLString &rExpression)
 
TCLPLUS::Bool_t ExprBoolean (const std::string &rExpression)
 
std::string TildeSubst (const char *pFilename) const
 
std::string TildeSubst (const CTCLString &rName) const
 
std::string TildeSubst (const std::string &rName) const
 
std::string PosixError () const
 
void DetachProcess (const std::vector< TCLPLUS::UInt_t > &rPids) const
 
void DetachProcess (TCLPLUS::UInt_t nPids, TCLPLUS::Int_t *pPids) const
 
void ReapDetachedProcesses () const
 
void AddCommand (const char *pCommandName, Tcl_CmdProc *pCommandProcessor, ClientData pData, Tcl_CmdDeleteProc *pDeleteProcessor=reinterpret_cast< Tcl_CmdDeleteProc *>(reinterpret_cast< size_t >(TCLPLUS::kpNULL))) const
 
void AddCommand (const std::string &rCommandName, Tcl_CmdProc *pCommandProcessor, ClientData pData, Tcl_CmdDeleteProc *pDeleteProcessor=reinterpret_cast< Tcl_CmdDeleteProc *>(reinterpret_cast< size_t >(TCLPLUS::kpNULL))) const
 
void AddCommand (const CTCLString &rCommandName, Tcl_CmdProc *pCommandProcessor, ClientData pData, Tcl_CmdDeleteProc *pDeleteProcessor=reinterpret_cast< Tcl_CmdDeleteProc *>(reinterpret_cast< size_t >(TCLPLUS::kpNULL))) const
 
void UnregisterCommand (const char *pCommandName) const
 
void UnregisterCommand (const std::string &rCommandName) const
 
void UnregisterCommand (const CTCLString &rCommandName) const
 
std::string GetResultString () const
 
Tcl_Channel GetChannel (const std::string &rName, TCLPLUS::Int_t *pMode=(TCLPLUS::Int_t *) TCLPLUS::kpNULL)
 
std::vector< std::string > GetChannelNames (const std::string &rPattern)
 
Tcl_Interp * operator-> ()
 
 operator Tcl_Interp * ()
 
void setResult (const char *resultString)
 
void setResult (std::string resultString)
 
void setResult (Tcl_Obj *resultObj)
 
void setResult (CTCLObject &resultObj)
 

Static Public Member Functions

static std::string ErrnoId ()
 
static std::string SignalId (TCLPLUS::UInt_t nSignal)
 
static std::string SignalMsg (TCLPLUS::UInt_t nSignal)
 

Protected Member Functions

void setInterpreter (Tcl_Interp *am_pInterpreter)
 

Member Function Documentation

◆ GetChannel()

Tcl_Channel CTCLInterpreter::GetChannel ( const std::string &  rName,
TCLPLUS::Int_t *  pMode = (TCLPLUS::Int_t*)TCLPLUS::kpNULL 
)

GetChannel - Given the name of a Tcl Channel registered with this interpreter, returns a Tcl channel handle. This is a pointer to an opaque structure. It can be used to construct a CTCLChannel object.

Parameters
rName(const string&) The name of the channel to lookup.
pMode(Int_t* [out] == kpNULL If non null, the integer pointed to by this will be filed in with a mask defining the access mode the channel supports. This will be the logical or of:
  • TCL_READABLE you may read the channel.
  • TCL_WRITABLE you may write the channel.
Returns
Tcl_Channel
Return values
NULL- There is no channel by this name.
nonnull-Opaque pointer to the channel.

◆ GetChannelNames()

vector< string > CTCLInterpreter::GetChannelNames ( const std::string &  rPattern)

GetChannelNames Given a pattern returns all the names of TCL channels that match the pattern. Note that "*" will return the names of all channels.

Parameters
rPattern(const string&): The glob pattern to match.
Returns
vector<string>
Return values
Emptyvector: no matches.
Eachelement of the vector is a channel name.

◆ setResult() [1/3]

void CTCLInterpreter::setResult ( const char *  resultString)

Set the interpreter result from a character string

Parameters
resultString: const char* Pointer to a null terminated string that will be set as the result.

◆ setResult() [2/3]

void CTCLInterpreter::setResult ( Tcl_Obj *  resultObj)

SEt the interpreter result from a Tcl_Obj*

Parameters
resultObj: Tcl_obj* The object to set the result to.

◆ setResult() [3/3]

void CTCLInterpreter::setResult ( CTCLObject resultObj)

SEt the interpreter result from a result object.

Parameters
resultObj: CTCLObject& Reference to the object containing the result string.

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