libutap
Public Member Functions | Protected Member Functions | Friends | List of all members
UTAP::symbol_t Class Reference

A reference to a symbol. More...

#include <symbols.h>

Public Member Functions

 symbol_t ()
 Default constructor. More...
 
 symbol_t (const symbol_t &)
 Copy constructor. More...
 
 ~symbol_t ()
 Destructor. More...
 
const symbol_toperator= (const symbol_t &)
 Assignment operator. More...
 
bool operator== (const symbol_t &) const
 Equality operator. More...
 
bool operator!= (const symbol_t &) const
 Inequality operator. More...
 
bool operator< (const symbol_t &) const
 Less-than operator. More...
 
frame_t getFrame ()
 Get frame this symbol belongs to. More...
 
type_t getType () const
 Returns the type of this symbol. More...
 
void setType (type_t)
 Alters the type of this symbol. More...
 
void * getData ()
 Returns the user data of this symbol. More...
 
const void * getData () const
 Return the user data of this symbol. More...
 
std::string getName () const
 Returns the name (identifier) of this symbol. More...
 
void setName (std::string)
 Alters the name of this symbol. More...
 
void setData (void *)
 Sets the user data of this symbol. More...
 

Protected Member Functions

 symbol_t (void *frame, type_t type, std::string name, void *user)
 

Friends

class frame_t
 

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,
std::string  name,
void *  user 
)
protected
UTAP::symbol_t::symbol_t ( )
inline

Default constructor.

symbol_t::symbol_t ( const symbol_t symbol)

Copy constructor.

symbol_t::~symbol_t ( )

Destructor.

Member Function Documentation

void * symbol_t::getData ( )
const void * symbol_t::getData ( ) const

Return the user data of this symbol.

frame_t symbol_t::getFrame ( )

Get frame this symbol belongs to.

References frame_t.

Referenced by UTAP::SignalFlow::visitExpression().

string symbol_t::getName ( ) const
type_t symbol_t::getType ( ) const
bool symbol_t::operator!= ( const symbol_t symbol) const

Inequality operator.

bool symbol_t::operator< ( const symbol_t symbol) const

Less-than operator.

const symbol_t & symbol_t::operator= ( const symbol_t symbol)

Assignment operator.

bool symbol_t::operator== ( const symbol_t symbol) const

Equality operator.

void symbol_t::setData ( void *  value)

Sets the user data of this symbol.

void symbol_t::setName ( std::string  )

Alters the name of this symbol.

void symbol_t::setType ( type_t  type)

Alters the type of this symbol.

Referenced by UTAP::SystemBuilder::procStateCommit(), and UTAP::SystemBuilder::procStateUrgent().

Friends And Related Function Documentation

friend class frame_t
friend

Referenced by getFrame().


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