Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

SymbolMap Class Reference

A SymbolMap is a map from Symbols in one SymbolTable to other Symbols. More...

#include <SymbolMap.h>

Collaboration diagram for SymbolMap:

Collaboration graph
[legend]
List of all members.

Public Methods


Detailed Description

A SymbolMap is a map from Symbols in one SymbolTable to other Symbols.

It's very small and fast if most/all of the Symbols are being mapped (but it would be poor for a very sparse mapping).

A mapping to Symbol::NULL is the same as no mapping.

I can imagine a cluster of SymbolMaps which would NOT have the "one SymbolTable" restriction, but would have a vector for each SymbolTable used. To avoid hashtable overhead, that cluster would probably use the SymbolTableNumbers, so it would grow with the number of SymbolTables in the process.

Alternatively, you could easily support a small number of SymbolTables with linear-time access, which is decent for the normal case of one or two symbol tables. Maybe a SymbolMap2.

Definition at line 28 of file SymbolMap.h.


Constructor & Destructor Documentation

SymbolMap::SymbolMap SymbolTable   table [inline]
 

we want to know what SymbolTable will be used.

If you don't know yet, you can use hungry mode (below).

Definition at line 36 of file SymbolMap.h.


Home to blindfold. This page generated via doxygen 1.2.11.1 Wed Oct 10 16:40:36 2001.