In file symboltable.hpp:

template<class T> class SymbolTable

A symbol table.

Documentation

A symbol table.

The symboltable provides a mapping from string identifiers to the generic type T. The strings are copied.


Inheritance:


Public Methods

[more] SymbolTable()
Creates a symboltable
[more]int Size() const
number of identifiers
[more]T& operator[] (const char* name)
Returns reference to element.
[more]T& operator[] (const string & name)
Returns reference to element.
[more]const T& operator[] (const char* name) const
Returns element, error if not used
[more]T& operator[] (int i)
Returns reference to i-th element
[more]const T& operator[] (int i) const
Returns const reference to i-th element
[more]const char* GetName(int i) const
Returns name of i-th element
[more]void Set(const char* name, const T & el)
Associates el to the string name, overrides if name is used
[more]bool Used(const char* name) const
Checks whether name is used
[more]inline void DeleteAll()
Deletes symboltable

Private Fields

[more]ARRAY<T> data
the data


Inherited from BaseSymbolTable:

Public Methods

ovoid DelNames()
ovoid AppendName(const char* name)
oint Index(const char* name) const
oint CheckIndex(const char* name) const

Protected Fields

oARRAY<char*> names

oARRAY<T> data
the data

o SymbolTable()
Creates a symboltable

oint Size() const
number of identifiers

oT& operator[] (const char* name)
Returns reference to element. exception for unused identifier

oT& operator[] (const string & name)
Returns reference to element. exception for unused identifier

oconst T& operator[] (const char* name) const
Returns element, error if not used

oT& operator[] (int i)
Returns reference to i-th element

oconst T& operator[] (int i) const
Returns const reference to i-th element

oconst char* GetName(int i) const
Returns name of i-th element

ovoid Set(const char* name, const T & el)
Associates el to the string name, overrides if name is used

obool Used(const char* name) const
Checks whether name is used

oinline void DeleteAll()
Deletes symboltable


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.