rasdaman complete source
|
#include <symtab.hh>
Public Member Functions | |
SymbolTable () | |
default constructor creates an empty symbol table, calls initScope(), clears local symbols. More... | |
~SymbolTable () | |
default destructor, calls exitScope(). More... | |
bool | putSymbol (const std::string &symbol, T value) |
Puts value at position symbol in the table. Returns true if it succeeded, otherwise false. More... | |
T | getSymbol (const std::string &symbol) |
Get value at position symbol from the table. If symbol doesn't exist, it returns NULL. More... | |
bool | lookupSymbol (const std::string &symbol) |
Returns true if symbol is in table. More... | |
void | initScope () |
Enter new scope. More... | |
void | exitScope () |
Exit current scope. More... | |
void | outScope () |
Output current scope to RMInit::logOut. More... | |
void | clearScope () |
Init scope by clearing inner symbols. More... | |
void | wipe () |
Clear all symbols in all scopes. More... | |
Public Attributes | |
std::vector< std::string > | keys |
This vector stores keys available in the map. More... | |
std::vector< std::string > ::iterator | keyIterator |
This is an iterator for the vector storing the keys available in the map. More... | |
SymbolTable< T >::SymbolTable | ( | ) |
default constructor creates an empty symbol table, calls initScope(), clears local symbols.
SymbolTable< T >::~SymbolTable | ( | ) |
default destructor, calls exitScope().
void SymbolTable< T >::clearScope | ( | ) |
Init scope by clearing inner symbols.
void SymbolTable< T >::exitScope | ( | ) |
Exit current scope.
T SymbolTable< T >::getSymbol | ( | const std::string & | symbol | ) |
Get value at position symbol from the table. If symbol doesn't exist, it returns NULL.
void SymbolTable< T >::initScope | ( | ) |
Enter new scope.
bool SymbolTable< T >::lookupSymbol | ( | const std::string & | symbol | ) |
Returns true if symbol is in table.
void SymbolTable< T >::outScope | ( | ) |
Output current scope to RMInit::logOut.
bool SymbolTable< T >::putSymbol | ( | const std::string & | symbol, |
T | value | ||
) |
Puts value at position symbol in the table. Returns true if it succeeded, otherwise false.
void SymbolTable< T >::wipe | ( | ) |
Clear all symbols in all scopes.
std::vector<std::string >::iterator SymbolTable< T >::keyIterator |
This is an iterator for the vector storing the keys available in the map.
std::vector<std::string > SymbolTable< T >::keys |
This vector stores keys available in the map.