rasdaman complete source
Public Member Functions | Public Attributes | List of all members
SymbolTable< T > Class Template Reference

#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...
 
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...
 

Constructor & Destructor Documentation

template<class T>
SymbolTable< T >::SymbolTable ( )

default constructor creates an empty symbol table, calls initScope(), clears local symbols.

template<class T>
SymbolTable< T >::~SymbolTable ( )

default destructor, calls exitScope().

Member Function Documentation

template<class T>
void SymbolTable< T >::clearScope ( )

Init scope by clearing inner symbols.

template<class T>
void SymbolTable< T >::exitScope ( )

Exit current scope.

template<class T>
T SymbolTable< T >::getSymbol ( const std::string &  symbol)

Get value at position symbol from the table. If symbol doesn't exist, it returns NULL.

template<class T>
void SymbolTable< T >::initScope ( )

Enter new scope.

template<class T>
bool SymbolTable< T >::lookupSymbol ( const std::string &  symbol)

Returns true if symbol is in table.

template<class T>
void SymbolTable< T >::outScope ( )

Output current scope to RMInit::logOut.

template<class T>
bool SymbolTable< T >::putSymbol ( const std::string &  symbol,
value 
)

Puts value at position symbol in the table. Returns true if it succeeded, otherwise false.

template<class T>
void SymbolTable< T >::wipe ( )

Clear all symbols in all scopes.

Member Data Documentation

template<class T>
std::vector<std::string >::iterator SymbolTable< T >::keyIterator

This is an iterator for the vector storing the keys available in the map.

template<class T>
std::vector<std::string > SymbolTable< T >::keys

This vector stores keys available in the map.


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