HQP
1.9.6
|
Interface variable of abstract type VarType managing callbacks for reading and writing. More...
#include <If_Variable.h>
Public Member Functions | |
virtual | ~If_Variable () |
Destructor. | |
virtual VarType | get () const |
Get value of interface variable. | |
virtual void | set (VarType value) |
Set value of interface variable. | |
Public Member Functions inherited from If_Element | |
If_Element (const char *ifName) | |
constructor | |
virtual | ~If_Element () |
destructor | |
const char * | ifName () |
get interface name | |
Public Member Functions inherited from If_ListElement | |
If_ListElement () | |
constructor | |
virtual | ~If_ListElement () |
destructor | |
Protected Member Functions | |
If_Variable (const char *ifName, If_GetIf< VarType > *getCb, If_SetIf< VarType > *setCb=NULL) | |
Constructor taking callback methods as arguments. More... | |
int | invoke (Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) |
Process command invokation. | |
virtual int | getTclObj (Tcl_Interp *)=0 |
Get the value of the interface variable and create a Tcl object containing it. More... | |
virtual int | setTclObj (Tcl_Interp *, Tcl_Obj *CONST objPtr)=0 |
Convert Tcl object to internal type and set the value of the interface variable. More... | |
Protected Attributes | |
If_GetIf< VarType > * | _getCb |
callback for reading | |
If_SetIf< VarType > * | _setCb |
callback for writing | |
Interface variable of abstract type VarType managing callbacks for reading and writing.
A derived class should pass dynamically created callback objects to the constructor. In order to invoke the callbacks, the methods get and set should be called from within the implementations for getTclObj and setTclObj, respectively (as defined by If_VariableCmd). The destructor of this base class will delete the callback objects.
|
inlineprotected |
Constructor taking callback methods as arguments.
|
protectedpure virtual |
Get the value of the interface variable and create a Tcl object containing it.
Implemented in If_IntVec, If_RealMat, If_RealVec, If_StdString, If_Bool, If_Int, If_Real, and If_String.
Referenced by If_Variable< If_Real_t >::invoke().
|
protectedpure virtual |
Convert Tcl object to internal type and set the value of the interface variable.
Implemented in If_IntVec, If_RealMat, If_RealVec, If_StdString, If_Bool, If_Int, If_Real, and If_String.
Referenced by If_Variable< If_Real_t >::invoke().