/** *BaseclassforAnyMatcherandSeriesMatcher.
*/ // Exported as U_I18N_API for tests class U_I18N_API CompositionMatcher : public NumberParseMatcher { protected: // No construction except by subclasses!
CompositionMatcher() = default;
// To be overridden by subclasses (used for iteration):
virtual const NumberParseMatcher* const* begin() const = 0;
// To be overridden by subclasses (used for iteration):
virtual const NumberParseMatcher* const* end() const = 0;
};
// NOTE: AnyMatcher is no longer being used. The previous definition is shown below. // The implementation can be found in SVN source control, deleted around March 30, 2018. ///** // * Composes a number of matchers, and succeeds if any of the matchers succeed. Always greedily chooses // * the first matcher in the list to succeed. // * // * NOTE: In C++, this is a base class, unlike ICU4J, which uses a factory-style interface. // * // * @author sffc // * @see SeriesMatcher // */ //class AnyMatcher : public CompositionMatcher { // public: // bool match(StringSegment& segment, ParsedNumber& result, UErrorCode& status) const override; // // bool smokeTest(const StringSegment& segment) const override; // // void postProcess(ParsedNumber& result) const override; // // protected: // // No construction except by subclasses! // AnyMatcher() = default; //};
/** *Composesanumberofmatchers,runningoneafteranother.Matchestheinputstringonlyifallofthe *matchersintheseriessucceed.Performsgreedymatcheswithinthecontextoftheseries. * *@authorsffc *@seeAnyMatcher
*/ // Exported as U_I18N_API for tests class U_I18N_API SeriesMatcher : public CompositionMatcher {
public: bool match(StringSegment& segment, ParsedNumber& result, UErrorCode& status) const override;
protected: // No construction except by subclasses!
SeriesMatcher() = default;
};
/** *AnimplementationofSeriesMatcherthatreferencesanarrayofmatchers. * *Theobjectadoptsthearray,butNOTthematcherscontainedinsidethearray.
*/ // Exported as U_I18N_API_CLASS for tests class U_I18N_API_CLASS ArraySeriesMatcher : public SeriesMatcher {
public:
U_I18N_API ArraySeriesMatcher(); // WARNING: Leaves the object in an unusable state
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.