In file modules/TclObject.h:

namespace yav class TclObject : public ListElement<TclObject>

base class for any object that is linked with a TCL command

Inheritance:


Public Methods

typedef int(TclObject::*OPTION) (int, char **)
command option pointer
int kindCmd (int argc, char **argv)
-kind command option valid for all TclObject
unsigned int getRef (void) const
returns objects unique id in objects kind list
virtual void name (TclString& objid) const
returns unique object identifier string
virtual TclString name (void) const
returns unique object identifier string
int(*getCommand(void)) (TclObject *, Tcl_Interp*, int, char **)
get command function associated to this object
void setCommand (int (*cmd)(TclObject *, Tcl_Interp*, int, char **))
set a new command function for this object
std::map < char *, CommandOption *, CStringCompare > * getOptions (void)
get options map
int error (void)
returns an error message with all command options
int exec (Tcl_Interp *interp, int argc, char **argv)
executes command
void resetResult (void)
reset object module's result
void setResult (const TclString& str) const
set object module's result
void setResult (const char *str) const
set object module's result
void setResult (char *s...) const
set object module's result
int tickle (const TclString& str) const
evaluates string in object module's TCL interpretor
int tickle (char *s...) const
formata string and evaluates it in object module's TCL interpretor
const char* getObjectName (void) const
returns object base name Tcl command name is 'getObjectName()getRef()'
TclModule* getModule (void) const
returns class module
static int list (TclModule *m, int argc, char **argv)
builds a TclObject objects list in module interpretor
static int create (TclModule *m, int argc, char **argv)
Default creation function for building a new T object from a TCL command line
static int genericCmd (ClientData cd, Tcl_Interp *interp, int argc, char **argv)
TCL callback command
TclObject* getHead (void) const
returns first object of that kind
TclObject* getTail (void) const
returns last object of that kind
static TclObject* getHead (const std::type_info& type)
returns object of given kind
static TclObject* getTail (const std::type_info& type)
returns last object of given kind
unsigned int getCount (void) const
returns number of object of that kind
TclObjectKind* getObjectKind (void) const
get this object class descriptor

Public

Constructors
TclObject (const std::type_info& info, TclModule *m = 0)
Build a new TCL object
TclObject (const TclObject& object)
copy construction
Destructor

Protected Fields

TclObjectKind* objectKind
TCL object class descriptor
unsigned int ref
objects unique reference for that kind

Protected Methods

void buildTCLCommand (void) const
builds a TCL command named 'objectName%u'
void deleteTCLCommand (void) const
deletes TCL command 'objectName%u'
void done (const std::type_info& id)
method that should be called at the end of any TclObject constructor to call all WarnedObjects callback
void deleted (const std::type_info& id)
method that should be called at the end of any TclObject destructor to call all WarnedObjects callback
void init (void)
constructors common code
void setObjectKind (const std::type_info& info, TclModule *m = 0)
set a new base object type for derivating objects

Documentation

base class for any object that is linked with a TCL command
TclObjectKind* objectKind
TCL object class descriptor

unsigned int ref
objects unique reference for that kind

void buildTCLCommand(void) const
builds a TCL command named 'objectName%u'

void deleteTCLCommand(void) const
deletes TCL command 'objectName%u'

void done(const std::type_info& id)
method that should be called at the end of any TclObject constructor to call all WarnedObjects callback
Parameters:
id - built object type

void deleted(const std::type_info& id)
method that should be called at the end of any TclObject destructor to call all WarnedObjects callback
Parameters:
id - built object type

typedef int (TclObject::*OPTION)(int, char **)
command option pointer

Constructors

TclObject(const std::type_info& info, TclModule *m = 0)
Build a new TCL object. A TCL command name 'objectName%u' where '%u' is object reference (available through getRef()) is created
Parameters:
info - object kind
m - module this object is created in

TclObject(const TclObject& object)
copy construction
Parameters:
object - object to copy

Destructor

int kindCmd(int argc, char **argv)
-kind command option valid for all TclObject

unsigned int getRef(void) const
returns objects unique id in objects kind list

virtual void name(TclString& objid) const
returns unique object identifier string
Parameters:
objid - returned name

virtual TclString name(void) const
returns unique object identifier string
Returns:
object name

int (*getCommand(void))(TclObject *, Tcl_Interp*, int, char **)
get command function associated to this object

void setCommand(int (*cmd)(TclObject *, Tcl_Interp*, int, char **))
set a new command function for this object

std::map < char *, CommandOption *, CStringCompare > * getOptions(void)
get options map

int error(void)
returns an error message with all command options

int exec(Tcl_Interp *interp, int argc, char **argv)
executes command
Returns:
TCL_OK if command succesfully evaluated, TCL_ERROR otherwise
Parameters:
interp - TCL interpretor to execute command
argc - command options number
argv - command options

void resetResult(void)
reset object module's result

void setResult(const TclString& str) const
set object module's result
Parameters:
str - result string

void setResult(const char *str) const
set object module's result
Parameters:
str - result string

void setResult(char *s...) const
set object module's result
Parameters:
str - printf-like format string
...format - arguments

int tickle(const TclString& str) const
evaluates string in object module's TCL interpretor
Returns:
command evaluation TCL return code
Parameters:
str - string to evaluate

int tickle(char *s...) const
formata string and evaluates it in object module's TCL interpretor
Parameters:
str - printf-like format string
...format - arguments

const char* getObjectName(void) const
returns object base name Tcl command name is 'getObjectName()getRef()'

TclModule* getModule(void) const
returns class module

static int list(TclModule *m, int argc, char **argv)
builds a TclObject objects list in module interpretor
Returns:
TCL_OK
Parameters:
m - module whose interpretor result string will be assingned
argc - command line number of arguments
argv - command line arguments

static int create(TclModule *m, int argc, char **argv)
Default creation function for building a new T object from a TCL command line. It should be overloaded by T::create. It returns an error message in m indicating that it cannot create T.
Returns:
TCL_OK
Parameters:
m - module whose interpretor result string will be assingned
arc - number of command line arguments
argv - command line arguments

static int genericCmd(ClientData cd, Tcl_Interp *interp, int argc, char **argv)
TCL callback command

TclObject* getHead(void) const
returns first object of that kind

TclObject* getTail(void) const
returns last object of that kind

static TclObject* getHead(const std::type_info& type)
returns object of given kind
Parameters:
type - object type to retrieve

static TclObject* getTail(const std::type_info& type)
returns last object of given kind
Parameters:
type - object type to retrieve

unsigned int getCount(void) const
returns number of object of that kind

TclObjectKind* getObjectKind(void) const
get this object class descriptor

void init(void)
constructors common code

void setObjectKind(const std::type_info& info, TclModule *m = 0)
set a new base object type for derivating objects
Parameters:
info - new object type
m - module for new object kind


Direct child classes:
TclParent
TclMatrix4D
TclGenericHistogram

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de