// Forward-declaration of implementation classes for friending class AffixPatternMatcherBuilder; class AffixPatternMatcher;
using ::icu::number::impl::AffixPatternProvider;
using ::icu::number::impl::TokenConsumer;
using ::icu::number::impl::CurrencySymbols;
class CodePointMatcher : public NumberParseMatcher, public UMemory {
public:
CodePointMatcher() = default; // WARNING: Leaves the object in an unusable state
/** *SmallhelperclassthatgeneratesmatchersforindividualtokensforAffixPatternMatcher. * *InJava,thisiscalledAffixTokenMatcherFactory(a"factory").However,inC++,itiscalleda *"warehouse",becauseinadditiontogeneratingthematchers,italsoretainsownershipofthem.The *warehousemuststayinscopeforthewholelifespanoftheAffixPatternMatcherthatusesmatchersfrom *thewarehouse. * *@authorsffc
*/ // Exported as U_I18N_API_CLASS for tests class U_I18N_API_CLASS AffixTokenMatcherWarehouse : public UMemory {
public:
AffixTokenMatcherWarehouse() = default; // WARNING: Leaves the object in an unusable state
private: // NOTE: The following field may be unsafe to access after construction is done! const AffixTokenMatcherSetupData* fSetupData;
// NOTE: These are default-constructed and should not be used until initialized.
MinusSignMatcher fMinusSign;
PlusSignMatcher fPlusSign;
ApproximatelySignMatcher fApproximatelySign;
PercentMatcher fPercent;
PermilleMatcher fPermille;
CombinedCurrencyMatcher fCurrency;
// Use a child class for code point matchers, since it requires non-default operators.
MemoryPool<CodePointMatcher> fCodePoints;
// Exported as U_I18N_API_CLASS for tests class U_I18N_API_CLASS AffixPatternMatcher : public ArraySeriesMatcher {
public:
AffixPatternMatcher() = default; // WARNING: Leaves the object in an unusable state
/** *AC++-onlyclasstoretainownershipoftheAffixMatchersneededforparsing.
*/ class AffixMatcherWarehouse {
public:
AffixMatcherWarehouse() = default; // WARNING: Leaves the object in an unusable state
private: // 18 is the limit: positive, zero, and negative, each with prefix, suffix, and prefix+suffix, // and doubled since there may be an empty currency symbol
AffixMatcher fAffixMatchers[18]; // 6 is the limit: positive, zero, and negative, a prefix and a suffix for each, // and doubled since there may be an empty currency symbol
AffixPatternMatcher fAffixPatternMatchers[12]; // Reference to the warehouse for tokens used by the AffixPatternMatchers
AffixTokenMatcherWarehouse* fTokenWarehouse;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.