Logo Search packages:      
Sourcecode: icu version File versions  Download package

SymbolTable Class Reference

#include <symtable.h>

Inheritance diagram for SymbolTable:


List of all members.

Detailed Description

An interface that defines both lookup protocol and parsing of symbolic names.

A symbol table maintains two kinds of mappings. The first is between symbolic names and their values. For example, if the variable with the name "start" is set to the value "alpha" (perhaps, though not necessarily, through an expression such as "$start=alpha"), then the call lookup("start") will return the char[] array ['a', 'l', 'p', 'h', 'a'].

The second kind of mapping is between character values and UnicodeMatcher objects. This is used by RuleBasedTransliterator, which uses characters in the private use area to represent objects such as UnicodeSets. If U+E015 is mapped to the UnicodeSet [a-z], then lookupMatcher(0xE015) will return the UnicodeSet [a-z].

Finally, a symbol table defines parsing behavior for symbolic names. All symbolic names start with the SYMBOL_REF character. When a parser encounters this character, it calls parseReference() with the position immediately following the SYMBOL_REF. The symbol table parses the name, if there is one, and returns it.

ICU 2.8

Definition at line 54 of file symtable.h.

Public Types

enum  { SYMBOL_REF = 0x0024 }

Public Member Functions

RESULT find (const char *const var_name, Pick **ref=NULL)
UBool is_complete ()
virtual const UnicodeStringlookup (const UnicodeString &s) const =0
virtual const UnicodeFunctorlookupMatcher (UChar32 ch) const =0
virtual UnicodeString parseReference (const UnicodeString &text, ParsePosition &pos, int32_t limit) const =0
void put (const char *const var_name, Pick *const var_ref=NULL)
void reset ()
virtual ~SymbolTable ()

Private Member Functions

int get_index (const char *const var_name)

Private Attributes

Buffer_char name_buffer
Buffer_int names
Buffer_pPick refs

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

Generated by  Doxygen 1.6.0   Back to index