// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ********************************************************************** * Copyright (c) 2000-2005, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description * 02/04/00 aliu Creation. ********************************************************************** */ #ifndef SYMTABLE_H #define SYMTABLE_H #include "unicode/utypes.h" #if U_SHOW_CPLUSPLUS_API #include "unicode/uobject.h" /** * \file * \brief C++ API: An interface that defines both lookup protocol and parsing of * symbolic names. */ U_NAMESPACE_BEGIN class ParsePosition; class UnicodeFunctor; class UnicodeSet; class UnicodeString; /** * An interface that defines both lookup protocol and parsing of * symbolic names. * * <p>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']. * * <p>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]. * * <p>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. * * @stable ICU 2.8 */ class U_COMMON_API SymbolTable /* not : public UObject because this is an interface/mixin class */ { … }; U_NAMESPACE_END #endif /* U_SHOW_CPLUSPLUS_API */ #endif