A library to create and manipulate symbols with a unique name. More...
#include <string>
#include <map>
Go to the source code of this file.
Classes | |
class | Symbol |
Symbols are unique objects with a name stored in a hash table. More... | |
Typedefs | |
typedef Symbol * | Sym |
Functions | |
Symbol * | symbol (const char *str) |
Returns (and creates if new) the symbol of name str . | |
Symbol * | symbol (const string &str) |
Returns (and creates if new) the symbol of name str . | |
Symbol * | unique (const char *str) |
Returns a new unique symbol of name strxxx. | |
const char * | name (Symbol *sym) |
Returns the name of a symbol. | |
void * | getUserData (Symbol *sym) |
Returns user data. | |
void | setUserData (Symbol *sym, void *d) |
Set user data. | |
ostream & | operator<< (ostream &s, const Symbol &n) |
A library to create and manipulate symbols with a unique name.
A library of functions to create and manipulate symbols with a unique name.
API:
Properties:
If p and q are two symbols then : p != q <=> name(p) != name(q)
Definition in file symbol.hh.
void* getUserData | ( | Symbol * | sym | ) | [inline] |
Returns user data.
Definition at line 100 of file symbol.hh.
References Symbol::fData.
Referenced by xtended::box(), computeBoxComplexity(), DocCompiler::generateCode(), ScalarCompiler::generateCode(), generateInsideSchema(), DocCompiler::generateXtended(), ScalarCompiler::generateXtended(), getSubSignals(), getUserData(), infereBoxType(), infereSigOrder(), infereSigType(), infereXType(), ppsig::print(), boxpp::print(), ppsig::printextended(), propagate(), realeval(), and simplification().
const char* name | ( | Symbol * | sym | ) | [inline] |
Returns the name of a symbol.
Definition at line 98 of file symbol.hh.
References Symbol::fName.
Referenced by computeBoxComplexity(), evalIdDef(), DocCompiler::generateCode(), ScalarCompiler::generateCode(), generateInsideSchema(), getDefFileProp(), getSubSignals(), infereSigOrder(), infereSigType(), isBefore(), isBoxIdent(), isDocTxt(), isVerySimpleFormula(), makePrivatisationKey(), makePrivatisationLabel(), normalizeLabel(), ppsig::print(), boxpp::print(), print(), propagate(), real_a2sb(), shprkey(), substkey(), tree2str(), verySimple(), and sigvisitor::visit().
ostream& operator<< | ( | ostream & | s, | |
const Symbol & | n | |||
) | [inline] |
Definition at line 103 of file symbol.hh.
References Symbol::print().
00103 { return n.print(s); }
void setUserData | ( | Symbol * | sym, | |
void * | d | |||
) | [inline] |
Set user data.
Definition at line 101 of file symbol.hh.
References Symbol::fData.
Referenced by xtended::xtended(), and xtended::~xtended().
Symbol* symbol | ( | const string & | str | ) | [inline] |
Returns (and creates if new) the symbol of name str
.
Definition at line 96 of file symbol.hh.
References Symbol::get().
Symbol* symbol | ( | const char * | str | ) | [inline] |
Returns (and creates if new) the symbol of name str
.
Definition at line 95 of file symbol.hh.
References Symbol::get().
Referenced by boxIdent(), docTxt(), and Node::Node().
Symbol* unique | ( | const char * | str | ) | [inline] |
Returns a new unique symbol of name strxxx.
Definition at line 97 of file symbol.hh.
References Symbol::prefix().
Referenced by calcDeBruijn2Sym(), makePrivatisationKey(), makePrivatisationLabel(), OccMarkup::mark(), pushNewLayer(), shprkey(), Occurrences::specificKey(), and substkey().