libutap
0.93
Uppaal Timed Automata Parser
|
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_t & | operator= (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 |
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.
|
protected |
|
inline |
Default constructor.
Definition at line 117 of file symbols.h.
Referenced by UTAP::range_t::size().
symbol_t::symbol_t | ( | const symbol_t & | symbol | ) |
Copy constructor.
Definition at line 141 of file symbols.cpp.
symbol_t::~symbol_t | ( | ) |
Destructor.
Definition at line 151 of file symbols.cpp.
void * symbol_t::getData | ( | ) |
Returns the user data of this symbol.
Definition at line 216 of file symbols.cpp.
Referenced by UTAP::template_t::addEdge(), UTAP::template_t::addMessage(), UTAP::template_t::addUpdate(), UTAP::StatementBuilder::collectDependencies(), collectDependencies(), UTAP::expression_t::collectPossibleReads(), UTAP::expression_t::collectPossibleWrites(), UTAP::ExpressionBuilder::exprDot(), UTAP::XMLWriter::init(), UTAP::SystemBuilder::instanceName(), UTAP::SystemBuilder::process(), UTAP::TypeChecker::visitBlockStatement(), and UTAP::SignalFlow::visitExpression().
const void * symbol_t::getData | ( | ) | const |
Return the user data of this symbol.
Definition at line 222 of file symbols.cpp.
frame_t symbol_t::getFrame | ( | ) |
Get frame this symbol belongs to.
Definition at line 199 of file symbols.cpp.
Referenced by UTAP::SignalFlow::visitExpression().
string symbol_t::getName | ( | ) | const |
Returns the name (identifier) of this symbol.
Definition at line 228 of file symbols.cpp.
Referenced by UTAP::frame_t::add(), UTAP::TimedAutomataSystem::addProcess(), UTAP::frame_t::addSymbol(), UTAP::SignalFlow::addVar(), UTAP::SignalFlow::checkParams(), UTAP::ExpressionBuilder::exprDot(), UTAP::XMLWriter::location(), UTAP::XMLWriter::name(), operator<<(), UTAP::SystemBuilder::process(), UTAP::XMLWriter::taTempl(), UTAP::XMLWriter::transition(), UTAP::ExpressionBuilder::typeName(), UTAP::ExpressionBuilder::typeScalar(), UTAP::SignalFlow::visitExpression(), and UTAP::SignalFlow::visitProcess().
type_t symbol_t::getType | ( | ) | const |
Returns the type of this symbol.
Definition at line 205 of file symbols.cpp.
Referenced by UTAP::template_t::addEdge(), UTAP::TimedAutomataSystem::addProcess(), UTAP::expression_t::collectPossibleReads(), UTAP::expression_t::collectPossibleWrites(), UTAP::expression_t::createIdentifier(), UTAP::StatementBuilder::declFuncEnd(), UTAP::SystemBuilder::instanceName(), UTAP::ExpressionBuilder::isType(), UTAP::XMLWriter::location(), operator<<(), UTAP::SystemBuilder::procEdgeBegin(), UTAP::SystemBuilder::process(), UTAP::SystemBuilder::procLscUpdate(), UTAP::SystemBuilder::procMessage(), UTAP::SystemBuilder::procStateCommit(), UTAP::SystemBuilder::procStateInit(), UTAP::SystemBuilder::procStateUrgent(), UTAP::StatementBuilder::returnStatement(), UTAP::ExpressionBuilder::typeName(), UTAP::TypeChecker::visitBlockStatement(), UTAP::SignalFlow::visitExpression(), UTAP::TypeChecker::visitFunction(), UTAP::TypeChecker::visitInstance(), UTAP::TypeChecker::visitIterationStatement(), UTAP::TypeChecker::visitProcess(), UTAP::CompileTimeComputableValues::visitVariable(), and UTAP::TypeChecker::visitVariable().
bool symbol_t::operator!= | ( | const symbol_t & | symbol | ) | const |
Inequality operator.
Definition at line 188 of file symbols.cpp.
bool symbol_t::operator< | ( | const symbol_t & | symbol | ) | const |
Less-than operator.
Definition at line 193 of file symbols.cpp.
Assignment operator.
Definition at line 164 of file symbols.cpp.
bool symbol_t::operator== | ( | const symbol_t & | symbol | ) | const |
Equality operator.
Definition at line 182 of file symbols.cpp.
void symbol_t::setData | ( | void * | value | ) |
Sets the user data of this symbol.
Definition at line 239 of file symbols.cpp.
void symbol_t::setName | ( | const std::string & | ) |
Alters the name of this symbol.
Definition at line 233 of file symbols.cpp.
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().