ICU4C 79
Loading...
Searching...
No Matches
symtable.h
Go to the documentation of this file.
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3/*
4**********************************************************************
5* Copyright (c) 2000-2005, International Business Machines
6* Corporation and others. All Rights Reserved.
7**********************************************************************
8* Date Name Description
9* 02/04/00 aliu Creation.
10**********************************************************************
11*/
12#ifndef SYMTABLE_H
13#define SYMTABLE_H
14
15#include "unicode/utypes.h"
16
17#if U_SHOW_CPLUSPLUS_API
18
19#include "unicode/uobject.h"
20
26
27U_NAMESPACE_BEGIN
28
29class ParsePosition;
30class UnicodeFunctor;
31class UnicodeSet;
32class UnicodeString;
33
59class U_COMMON_API SymbolTable /* not : public UObject because this is an interface/mixin class */ {
60public:
61
66 enum { SYMBOL_REF = 0x0024 /*$*/ };
67
72 virtual ~SymbolTable();
73
83 virtual const UnicodeString* lookup(const UnicodeString& s) const U_LIFETIME_BOUND = 0;
84
91 virtual const UnicodeSet* lookupSet(const UnicodeString& /*name*/) const {
92 return nullptr;
93 }
94
103 virtual const UnicodeFunctor* lookupMatcher(UChar32 ch) const U_LIFETIME_BOUND = 0;
104
123 ParsePosition& pos, int32_t limit) const = 0;
124};
125U_NAMESPACE_END
126
127#endif /* U_SHOW_CPLUSPLUS_API */
128
129#endif
ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...
Definition parsepos.h:52
An interface that defines both lookup protocol and parsing of symbolic names.
Definition symtable.h:59
virtual const UnicodeSet * lookupSet(const UnicodeString &) const
Returns a pointer to a pre-parsed set associated with the variable with the given name,...
Definition symtable.h:91
virtual const UnicodeFunctor * lookupMatcher(UChar32 ch) const =0
Lookup the UnicodeMatcher associated with the given character, and return it.
virtual const UnicodeString * lookup(const UnicodeString &s) const =0
Lookup the characters associated with this string and return it.
virtual ~SymbolTable()
Destructor.
virtual UnicodeString parseReference(const UnicodeString &text, ParsePosition &pos, int32_t limit) const =0
Parse a symbol reference name from the given string, starting at the given position.
UnicodeFunctor is an abstract base class for objects that perform match and/or replace operations on ...
Definition unifunct.h:38
A mutable set of Unicode characters and multicharacter strings.
Definition uniset.h:175
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition unistr.h:303
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition umachine.h:449
C++ API: Common ICU base class UObject.
Basic definitions for ICU, for both C and C++ APIs.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside.
Definition utypes.h:315