libutap  0.93
Uppaal Timed Automata Parser
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 (const 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, const 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.

Definition at line 107 of file symbols.h.

Constructor & Destructor Documentation

◆ symbol_t() [1/3]

UTAP::symbol_t::symbol_t ( void *  frame,
type_t  type,
const std::string &  name,
void *  user 
)
protected

◆ symbol_t() [2/3]

UTAP::symbol_t::symbol_t ( )
inline

Default constructor.

Definition at line 117 of file symbols.h.

Referenced by UTAP::range_t::size().

Here is the caller graph for this function:

◆ symbol_t() [3/3]

symbol_t::symbol_t ( const symbol_t symbol)

Copy constructor.

Definition at line 141 of file symbols.cpp.

◆ ~symbol_t()

symbol_t::~symbol_t ( )

Destructor.

Definition at line 151 of file symbols.cpp.

Member Function Documentation

◆ getData() [1/2]

◆ getData() [2/2]

const void * symbol_t::getData ( ) const

Return the user data of this symbol.

Definition at line 222 of file symbols.cpp.

◆ getFrame()

frame_t symbol_t::getFrame ( )

Get frame this symbol belongs to.

Definition at line 199 of file symbols.cpp.

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

Here is the caller graph for this function:

◆ getName()

◆ getType()

◆ operator!=()

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

Inequality operator.

Definition at line 188 of file symbols.cpp.

◆ operator<()

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

Less-than operator.

Definition at line 193 of file symbols.cpp.

◆ operator=()

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

Assignment operator.

Definition at line 164 of file symbols.cpp.

◆ operator==()

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

Equality operator.

Definition at line 182 of file symbols.cpp.

◆ setData()

void symbol_t::setData ( void *  value)

Sets the user data of this symbol.

Definition at line 239 of file symbols.cpp.

◆ setName()

void symbol_t::setName ( const std::string &  )

Alters the name of this symbol.

Definition at line 233 of file symbols.cpp.

◆ setType()

void symbol_t::setType ( type_t  type)

Alters the type of this symbol.

Definition at line 210 of file symbols.cpp.

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

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ frame_t

friend class frame_t
friend

Definition at line 113 of file symbols.h.


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