chromium/third_party/icu/source/i18n/numparse_affixes.cpp

// © 2018 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html

#include "unicode/utypes.h"

#if !UCONFIG_NO_FORMATTING

// Allow implicit conversion from char16_t* to UnicodeString for this file:
// Helpful in toString methods and elsewhere.
#define UNISTR_FROM_STRING_EXPLICIT

#include "numparse_types.h"
#include "numparse_affixes.h"
#include "numparse_utils.h"
#include "number_utils.h"
#include "string_segment.h"

usingnamespaceicu;
usingnamespaceicu::numparse;
usingnamespaceicu::numparse::impl;
usingnamespaceicu::number;
usingnamespaceicu::number::impl;


namespace {

/**
 * Helper method to return whether the given AffixPatternMatcher equals the given pattern string.
 * Either both arguments must be null or the pattern string inside the AffixPatternMatcher must equal
 * the given pattern string.
 */
static bool matched(const AffixPatternMatcher* affix, const UnicodeString& patternString) {}

/**
 * Helper method to return the length of the given AffixPatternMatcher. Returns 0 for null.
 */
static int32_t length(const AffixPatternMatcher* matcher) {}

/**
 * Helper method to return whether (1) both lhs and rhs are null/invalid, or (2) if they are both
 * valid, whether they are equal according to operator==.  Similar to Java Objects.equals()
 */
static bool equals(const AffixPatternMatcher* lhs, const AffixPatternMatcher* rhs) {}

}


AffixPatternMatcherBuilder::AffixPatternMatcherBuilder(const UnicodeString& pattern,
                                                       AffixTokenMatcherWarehouse& warehouse,
                                                       IgnorablesMatcher* ignorables)
        :{}

void AffixPatternMatcherBuilder::consumeToken(AffixPatternType type, UChar32 cp, UErrorCode& status) {}

void AffixPatternMatcherBuilder::addMatcher(NumberParseMatcher& matcher) {}

AffixPatternMatcher AffixPatternMatcherBuilder::build(UErrorCode& status) {}

AffixTokenMatcherWarehouse::AffixTokenMatcherWarehouse(const AffixTokenMatcherSetupData* setupData)
        :{}

NumberParseMatcher& AffixTokenMatcherWarehouse::minusSign() {}

NumberParseMatcher& AffixTokenMatcherWarehouse::plusSign() {}

NumberParseMatcher& AffixTokenMatcherWarehouse::percent() {}

NumberParseMatcher& AffixTokenMatcherWarehouse::permille() {}

NumberParseMatcher& AffixTokenMatcherWarehouse::currency(UErrorCode& status) {}

IgnorablesMatcher& AffixTokenMatcherWarehouse::ignorables() {}

NumberParseMatcher* AffixTokenMatcherWarehouse::nextCodePointMatcher(UChar32 cp, UErrorCode& status) {}

bool AffixTokenMatcherWarehouse::hasEmptyCurrencySymbol() const {}


CodePointMatcher::CodePointMatcher(UChar32 cp)
        :{}

bool CodePointMatcher::match(StringSegment& segment, ParsedNumber& result, UErrorCode&) const {}

bool CodePointMatcher::smokeTest(const StringSegment& segment) const {}

UnicodeString CodePointMatcher::toString() const {}


AffixPatternMatcher AffixPatternMatcher::fromAffixPattern(const UnicodeString& affixPattern,
                                                          AffixTokenMatcherWarehouse& tokenWarehouse,
                                                          parse_flags_t parseFlags, bool* success,
                                                          UErrorCode& status) {}

AffixPatternMatcher::AffixPatternMatcher(MatcherArray& matchers, int32_t matchersLen,
                                         const UnicodeString& pattern, UErrorCode& status)
    :{}

UnicodeString AffixPatternMatcher::getPattern() const {}

bool AffixPatternMatcher::operator==(const AffixPatternMatcher& other) const {}


AffixMatcherWarehouse::AffixMatcherWarehouse(AffixTokenMatcherWarehouse* tokenWarehouse)
        :{}

bool AffixMatcherWarehouse::isInteresting(const AffixPatternProvider& patternInfo,
                                          const IgnorablesMatcher& ignorables, parse_flags_t parseFlags,
                                          UErrorCode& status) {}

void AffixMatcherWarehouse::createAffixMatchers(const AffixPatternProvider& patternInfo,
                                                MutableMatcherCollection& output,
                                                const IgnorablesMatcher& ignorables,
                                                parse_flags_t parseFlags, UErrorCode& status) {}


AffixMatcher::AffixMatcher(AffixPatternMatcher* prefix, AffixPatternMatcher* suffix, result_flags_t flags)
        :{}

bool AffixMatcher::match(StringSegment& segment, ParsedNumber& result, UErrorCode& status) const {}

bool AffixMatcher::smokeTest(const StringSegment& segment) const {}

void AffixMatcher::postProcess(ParsedNumber& result) const {}

int8_t AffixMatcher::compareTo(const AffixMatcher& rhs) const {}

UnicodeString AffixMatcher::toString() const {}


#endif /* #if !UCONFIG_NO_FORMATTING */