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

#include <TCLTracedVariable.h>

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

Public Member Functions

 CTCLTracedVariable (CTCLInterpreter *pInterp, std::string Name, CVariableTraceCallback &Trace, int flags=(TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS))
 
virtual ~CTCLTracedVariable ()
 
CVariableTraceCallbackgetCallback ()
 
virtual char * operator() (char *pName, char *pElement, int flags)
 
- Public Member Functions inherited from CTCLVariable
 CTCLVariable (std::string am_sVariable, TCLPLUS::Bool_t am_fTracing)
 
 CTCLVariable (CTCLInterpreter *pInterp, std::string am_sVariable, TCLPLUS::Bool_t am_fTracing)
 
 CTCLVariable (const CTCLVariable &aCTCLVariable)
 
CTCLVariableoperator= (const CTCLVariable &aCTCLVariable)
 
int operator== (const CTCLVariable &aCTCLVariable) const
 
std::string getVariableName () const
 
TCLPLUS::Bool_t IsTracing () const
 
void setVariableName (const std::string am_sVariable)
 
const char * Set (const char *pValue, int flags=TCL_LEAVE_ERR_MSG|TCL_GLOBAL_ONLY)
 
const char * Set (const char *pSubscript, const char *pValue, int flags=TCL_LEAVE_ERR_MSG|TCL_GLOBAL_ONLY)
 
const char * Get (int flags=TCL_LEAVE_ERR_MSG|TCL_GLOBAL_ONLY, char *pIndex=0)
 
int Link (void *pVariable, int Type)
 
void Unlink ()
 
int Trace (int flags=TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, char *pIndex=(char *) TCLPLUS::kpNULL)
 
void UnTrace ()
 
- 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

- Static Public Member Functions inherited from CTCLVariable
static char * TraceRelay (ClientData pObject, Tcl_Interp *pInterpreter, tclConstCharPtr pName, tclConstCharPtr pIndex, int flags)
 
- Protected Member Functions inherited from CTCLVariable
void setTracing (TCLPLUS::Bool_t am_fTracing)
 
void DoAssign (const CTCLVariable &rRhs)
 
- Protected Member Functions inherited from CTCLInterpreterObject
CTCLInterpreterAssertIfNotBound ()
 

Detailed Description

This class is an extension of the CTCLVariable class designed to make dealing with tracing somewhat simpler. The class will contain a 'trace callback' object which is dispatched to by the trace handler. Thus, in theory, in stead of having a ton of derived CTCLVariables, you'll hopefully only have a few CVariableTraceCallback objects. The characteristics of the trace are set up at construction time and remain fixed for the lifetime of an object.

Constructor & Destructor Documentation

◆ ~CTCLTracedVariable()

CTCLTracedVariable::~CTCLTracedVariable ( )
virtual

Destructor... Since we are going out of scope we need to first untrace.

Member Function Documentation

◆ operator()()

char * CTCLTracedVariable::operator() ( char *  pName,
char *  pElement,
int  flags 
)
virtual

Function call operator.. This is called in response to the trace fire.

Parameters
pName(char*) Pointer to the name of the variable that traced. This can differ from the name of the variable because if the variable was an array element, this will be the array's base name.
pElement(char*) Pointer to the name of the array element or NULL If not an array element.
flags(int): The flag bit indicating which trace fired.
Returns
char*
Return values
NULL- no errors.
notnull - Pointer to an error message string, the access will fail with an error, and this string will represent the error

Reimplemented from CTCLVariable.


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