chromium/third_party/icu/source/i18n/plurrule_impl.h

// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2007-2016, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
* File PLURRULE_IMPL.H
*
*******************************************************************************
*/


#ifndef PLURRULE_IMPL
#define PLURRULE_IMPL

// Internal definitions for the PluralRules implementation.

#include "unicode/utypes.h"

#if !UCONFIG_NO_FORMATTING

#include "unicode/format.h"
#include "unicode/locid.h"
#include "unicode/parseerr.h"
#include "unicode/strenum.h"
#include "unicode/ures.h"
#include "uvector.h"
#include "hash.h"
#include "uassert.h"

/**
 * A FixedDecimal version of UPLRULES_NO_UNIQUE_VALUE used in PluralRulesTest
 * for parsing of samples.
 */
#define UPLRULES_NO_UNIQUE_VALUE_DECIMAL(ERROR_CODE)

class PluralRulesTest;

U_NAMESPACE_BEGIN

class AndConstraint;
class RuleChain;
class DigitInterval;
class PluralRules;
class VisibleDigits;

namespace pluralimpl {

// TODO: Remove this and replace with u"" literals. Was for EBCDIC compatibility.

static const char16_t DOT =;
static const char16_t SINGLE_QUOTE =;
static const char16_t SLASH =;
static const char16_t BACKSLASH =;
static const char16_t SPACE =;
static const char16_t EXCLAMATION =;
static const char16_t QUOTATION_MARK =;
static const char16_t NUMBER_SIGN =;
static const char16_t PERCENT_SIGN =;
static const char16_t ASTERISK =;
static const char16_t COMMA =;
static const char16_t HYPHEN =;
static const char16_t U_ZERO =;
static const char16_t U_ONE =;
static const char16_t U_TWO =;
static const char16_t U_THREE =;
static const char16_t U_FOUR =;
static const char16_t U_FIVE =;
static const char16_t U_SIX =;
static const char16_t U_SEVEN =;
static const char16_t U_EIGHT =;
static const char16_t U_NINE =;
static const char16_t COLON =;
static const char16_t SEMI_COLON =;
static const char16_t EQUALS =;
static const char16_t AT =;
static const char16_t CAP_A =;
static const char16_t CAP_B =;
static const char16_t CAP_R =;
static const char16_t CAP_Z =;
static const char16_t LOWLINE =;
static const char16_t LEFTBRACE =;
static const char16_t RIGHTBRACE =;
static const char16_t TILDE =;
static const char16_t ELLIPSIS =;

static const char16_t LOW_A =;
static const char16_t LOW_B =;
static const char16_t LOW_C =;
static const char16_t LOW_D =;
static const char16_t LOW_E =;
static const char16_t LOW_F =;
static const char16_t LOW_G =;
static const char16_t LOW_H =;
static const char16_t LOW_I =;
static const char16_t LOW_J =;
static const char16_t LOW_K =;
static const char16_t LOW_L =;
static const char16_t LOW_M =;
static const char16_t LOW_N =;
static const char16_t LOW_O =;
static const char16_t LOW_P =;
static const char16_t LOW_Q =;
static const char16_t LOW_R =;
static const char16_t LOW_S =;
static const char16_t LOW_T =;
static const char16_t LOW_U =;
static const char16_t LOW_V =;
static const char16_t LOW_W =;
static const char16_t LOW_Y =;
static const char16_t LOW_Z =;

}


static const int32_t PLURAL_RANGE_HIGH =;

enum tokenType {};


class PluralRuleParser: public UMemory {};

enum PluralOperand {};

/**
 * Converts from the tokenType enum to PluralOperand. Asserts that the given
 * tokenType can be mapped to a PluralOperand.
 */
PluralOperand tokenTypeToPluralOperand(tokenType tt);

/**
 * An interface to FixedDecimal, allowing for other implementations.
 * @internal
 */
class U_I18N_API IFixedDecimal {};

/**
 * class FixedDecimal serves to communicate the properties
 * of a formatted number from a decimal formatter to PluralRules::select()
 *
 * see DecimalFormat::getFixedDecimal()
 * @internal
 */
class U_I18N_API FixedDecimal: public IFixedDecimal, public UObject {};

class AndConstraint : public UMemory  {};

class OrConstraint : public UMemory  {};

class RuleChain : public UMemory  {};

class PluralKeywordEnumeration : public StringEnumeration {};


class U_I18N_API PluralAvailableLocalesEnumeration: public StringEnumeration {};

U_NAMESPACE_END

#endif /* #if !UCONFIG_NO_FORMATTING */

#endif // _PLURRULE_IMPL
//eof