Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

cWatch Class Reference
[Utility classes]

#include <cwatch.h>

Inheritance diagram for cWatch:

cObject cPolymorphic List of all members.

Detailed Description

Utility class to make int, long, double, char, etc.

variables to be inspectable in Tkenv.

Users rarely need to create cWatch objects directly, they rather use the WATCH() and LWATCH() macros.


Public Member Functions

Constructors, destructor, assignment
 cWatch (const cWatch &vs)
 cWatch (const char *name, char &c)
 cWatch (const char *name, signed char &c)
 cWatch (const char *name, unsigned char &c)
 cWatch (const char *name, bool &b)
 cWatch (const char *name, int &i)
 cWatch (const char *name, unsigned int &i)
 cWatch (const char *name, long &l)
 cWatch (const char *name, unsigned long &l)
 cWatch (const char *name, double &d)
 cWatch (const char *name, const char *&s)
 cWatch (const char *name, const signed char *&s)
 cWatch (const char *name, const unsigned char *&s)
 cWatch (const char *name, const cObject *&o)
cWatch & operator= (const cWatch &vs)
Redefined cObject member functions.
virtual cObject * dup () const
virtual std::string info () const
virtual void writeContents (std::ostream &os)
Accessing the stored variable reference.
virtual void printTo (char *s) const
char typeChar () const
void * pointer () const


Constructor & Destructor Documentation

cWatch::cWatch (  const cWatch &  vs  ) 
 

Copy constructor.

cWatch::cWatch (  const char *  name,
char &  c
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
signed char &  c
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
unsigned char &  c
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
bool &  b
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
int &  i
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
unsigned int &  i
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
long &  l
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
unsigned long &  l
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
double &  d
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
const char *&  s
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
const signed char *&  s
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
const unsigned char *&  s
)  [inline]
 

Initialize the shell to hold the given variable.

cWatch::cWatch (  const char *  name,
const cObject *&  o
)  [inline]
 

Initialize the shell to hold the given variable.


Member Function Documentation

virtual cObject* cWatch::dup (   )  const [inline, virtual]
 

Creates and returns an exact copy of this object.

See cObject for more details.

Reimplemented from cObject.

virtual std::string cWatch::info (   )  const [virtual]
 

Produces a one-line information about the object.

Output is like this: "int samples = 12 (12U, 0xC)"

Reimplemented from cPolymorphic.

cWatch& cWatch::operator= (  const cWatch &  vs  )  [inline]
 

Assignment operator.

The name member doesn't get copied; see cObject's operator=() for more details.

void* cWatch::pointer (   )  const [inline]
 

Returns pointer to the referenced variable.

virtual void cWatch::printTo (  char *  s  )  const [virtual]
 

Does actual work for info() and writeContents().

The output looks like this: "int samples = 12 (12U, 0xC)".

char cWatch::typeChar (   )  const [inline]
 

Returns the type of the referenced variable.

The return value is 'c','i','l','d','s','o' for char, int, long, double, string, cObject pointer, respectively.

virtual void cWatch::writeContents (  std::ostream &  os  )  [virtual]
 

Writes the value of the variable to the output stream.

The output looks like this: "int samples = 12 (12U, 0xC)".

Reimplemented from cObject.


The documentation for this class was generated from the following file:
Generated on Fri Apr 1 12:25:35 2005 for OMNeT++/OMNEST Simulation Library by  doxygen 1.3.9.1