ecolab::tclvar Class Reference

TCL variable class. More...

#include <tcl++.h>

Collaboration diagram for ecolab::tclvar:
Collaboration graph

Public Member Functions

 tclvar (const string &nm, const char *val=NULL)
 TCL var name this i sbound to. If val not null, then initialise the var to val.
 
 tclvar (const string &nm, const string &val)
 
void init (const char *val=NULL)
 
tclvar operator= (double x)
 tclvars may be freely mixed with arithmetic expressions
 
tclvar operator= (const char *x)
 
tclvar operator= (const string &x)
 
tclvar operator+= (const string &x)
 
string operator+ (const string &x)
 
 operator double ()
 
 operator const char * ()
 
 operator int ()
 
 operator unsigned ()
 
double operator++ ()
 
double operator++ (int)
 
double operator-- ()
 
double operator-- (int)
 
double operator+= (double x)
 
double operator-= (double x)
 
double operator*= (double x)
 
double operator/= (double x)
 
tclvar operator[] (int index)
 arrays can be indexed either by integers, or by strings
 
tclvar operator[] (const string &index)
 arrays can be indexed either by integers, or by strings
 
int size ()
 size of arrays
 

Friends

class tclindex
 
bool exists (const tclvar &x)
 Check if a TCL variable exists.
 

Detailed Description

TCL variable class.

A class implementing the concept of a TCL variable. Here, if the programmer declares

tclvar hello="hello";

then the variable hello can be used just like a normal C variable in expression such as

floatvar=hello*3.4.

However the difference is that hello is bound to a TCL variable called hello, which can be accessed from TCL scripts.


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