#include <symbols.h>
Public Member Functions | |
symbol_t () | |
Default constructor. | |
symbol_t (const symbol_t &) | |
Copy constructor. | |
~symbol_t () | |
Destructor. | |
const symbol_t & | operator= (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. | |
std::string | 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, std::string name, void *user) | |
Friends | |
class | frame_t |
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.
UTAP::symbol_t::symbol_t | ( | void * | frame, | |
type_t | type, | |||
std::string | 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.
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.
std::string 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.
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.
friend class frame_t [friend] |