/*
*******************************************************************************
-* Copyright (C) 1997-2001, International Business Machines Corporation and others. All Rights Reserved.
+* Copyright (C) 1997-2008, International Business Machines
+* Corporation and others. All Rights Reserved.
*******************************************************************************
*/
#include "unicode/utypes.h"
#include "unicode/uobject.h"
#include "unicode/unistr.h"
+#include "putilimp.h"
U_NAMESPACE_BEGIN
void setType(ERuleType ruleType) { baseValue = (int32_t)ruleType; }
int64_t getBaseValue() const { return baseValue; }
- void setBaseValue(int64_t value);
+ void setBaseValue(int64_t value, UErrorCode& status);
double getDivisor() const { return uprv_pow(radix, exponent); }
UBool shouldRollBack(double number) const;
- void appendRuleText(UnicodeString& result) const;
+ void _appendRuleText(UnicodeString& result) const;
private:
void parseRuleDescriptor(UnicodeString& descriptor, UErrorCode& status);
double upperBound) const;
void stripPrefix(UnicodeString& text, const UnicodeString& prefix, ParsePosition& pp) const;
- int32_t prefixLength(const UnicodeString& str, const UnicodeString& prefix) const;
- UBool allIgnorable(const UnicodeString& str) const;
+ int32_t prefixLength(const UnicodeString& str, const UnicodeString& prefix, UErrorCode& status) const;
+ UBool allIgnorable(const UnicodeString& str, UErrorCode& status) const;
int32_t findText(const UnicodeString& str, const UnicodeString& key,
int32_t startingAt, int32_t* resultCount) const;
private:
int64_t baseValue;
- int16_t radix;
+ int32_t radix;
int16_t exponent;
UnicodeString ruleText;
NFSubstitution* sub1;