Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

UTAP::symbol_t Class Reference

A reference to a symbol. More...

#include <symbols.hh>

List of all members.

Public Member Functions

 symbol_t ()
 Default constructor.

 symbol_t (const symbol_t &)
 Copy constructor.

 ~symbol_t ()
 Destructor.

const symbol_toperator= (const symbol_t &)
 Assignment operator.

bool operator== (const symbol_t &) const
 Equality operator.

bool operator!= (const symbol_t &) const
 Inequality operator.

bool operator< (const symbol_t &) const
 Less-than operator.

frame_t getFrame ()
 Get frame this symbol belongs to.

type_t getType () const
 Returns the type of this symbol.

void setType (type_t)
 Alters the type of this symbol.

void * getData ()
 Returns the user data of this symbol.

const void * getData () const
 Return the user data of this symbol.

const char * getName () const
 Returns the name (identifier) of this symbol.

void setData (void *)
 Sets the user data of this symbol.


Protected Member Functions

 symbol_t (void *frame, type_t &type, const char *name, void *user)


Detailed Description

A reference to a symbol.

Symbols can only be accessed via instances of symbol_t. Internally, symbols are reference counted and do not need to be deallocated manually. Each symbol has a name (which might be NULL) a type and an uninterpreted optional void pointer.

Symbols are members of a frame (see also frame_t). It is possible to access the frame of a symbol via the symbol (see getFrame()). However, a symbol does not contain a counted reference to its frame so you must maintain at least one reference to the frame to avoid to be deallocated.

Notice that it is possible to add the same symbol to several frames. In this case, the symbol will only "point back" to the first frame it was added to.


Constructor & Destructor Documentation

UTAP::symbol_t::symbol_t void *  frame,
type_t type,
const char *  name,
void *  user
[protected]
 

UTAP::symbol_t::symbol_t  ) 
 

Default constructor.

UTAP::symbol_t::symbol_t const symbol_t  ) 
 

Copy constructor.

UTAP::symbol_t::~symbol_t  ) 
 

Destructor.


Member Function Documentation

const void* UTAP::symbol_t::getData  )  const
 

Return the user data of this symbol.

void* UTAP::symbol_t::getData  ) 
 

Returns the user data of this symbol.

frame_t UTAP::symbol_t::getFrame  ) 
 

Get frame this symbol belongs to.

const char* UTAP::symbol_t::getName  )  const
 

Returns the name (identifier) of this symbol.

type_t UTAP::symbol_t::getType  )  const
 

Returns the type of this symbol.

bool UTAP::symbol_t::operator!= const symbol_t  )  const
 

Inequality operator.

bool UTAP::symbol_t::operator< const symbol_t  )  const
 

Less-than operator.

const symbol_t& UTAP::symbol_t::operator= const symbol_t  ) 
 

Assignment operator.

bool UTAP::symbol_t::operator== const symbol_t  )  const
 

Equality operator.

void UTAP::symbol_t::setData void *   ) 
 

Sets the user data of this symbol.

void UTAP::symbol_t::setType type_t   ) 
 

Alters the type of this symbol.


The documentation for this class was generated from the following file:
Generated on Sat May 15 12:33:43 2004 for libutap by doxygen 1.3.7