15 #ifndef __MESSAGEPATTERN_H__
16 #define __MESSAGEPATTERN_H__
25 #if !UCONFIG_NO_FORMATTING
280 #define UMSGPAT_NO_NUMERIC_VALUE ((double)(-123456789))
284 class MessagePatternDoubleList;
285 class MessagePatternPartsList;
525 int32_t hashCode()
const;
561 return hasArgNumbers;
575 static int32_t validateArgumentName(
const UnicodeString &name);
619 return getPart(i).type;
630 return getPart(partIndex).index;
652 return 0==msg.compare(part.index, part.length, s);
661 double getNumericValue(
const Part &part)
const;
669 double getPluralOffset(int32_t pluralStart)
const;
680 int32_t limit=getPart(start).limitPartIndex;
797 return ((type*37+index)*37+length)*37+value;
803 static const int32_t MAX_LENGTH=0xffff;
804 static const int32_t MAX_VALUE=0x7fff;
812 int32_t limitPartIndex;
820 int32_t parseMessage(int32_t index, int32_t msgStartLength,
824 int32_t parseArg(int32_t index, int32_t argStartLength, int32_t nestingLevel,
843 static int32_t parseArgNumber(
const UnicodeString &s, int32_t start, int32_t limit);
845 int32_t parseArgNumber(int32_t start, int32_t limit) {
846 return parseArgNumber(msg, start, limit);
857 void parseDouble(int32_t start, int32_t limit,
UBool allowInfinity,
863 int32_t skipWhiteSpace(int32_t index);
865 int32_t skipIdentifier(int32_t index);
871 int32_t skipDouble(int32_t index);
875 UBool isChoice(int32_t index);
877 UBool isPlural(int32_t index);
879 UBool isSelect(int32_t index);
885 UBool inMessageFormatPattern(int32_t nestingLevel);
896 void addLimitPart(int32_t start,
900 void addArgDoublePart(
double numericValue, int32_t start, int32_t length,
UErrorCode &errorCode);
902 void setParseError(
UParseError *parseError, int32_t index);
913 MessagePatternPartsList *partsList;
917 MessagePatternDoubleList *numericValuesList;
918 double *numericValues;
919 int32_t numericValuesLength;
922 UBool needsAutoQuoting;
927 #endif // !UCONFIG_NO_FORMATTING
929 #endif // __MESSAGEPATTERN_H__