-class NullSubstitution : public NFSubstitution {
-public:
- NullSubstitution(int32_t _pos,
- const NFRuleSet* _ruleSet,
- const RuleBasedNumberFormat* formatter,
- const UnicodeString& description,
- UErrorCode& status)
- : NFSubstitution(_pos, _ruleSet, formatter, description, status) {}
- virtual ~NullSubstitution();
-
- virtual void toString(UnicodeString& /*result*/) const {}
- virtual void doSubstitution(double /*number*/, UnicodeString& /*toInsertInto*/, int32_t /*_pos*/, UErrorCode& /*status*/) const {}
- virtual void doSubstitution(int64_t /*number*/, UnicodeString& /*toInsertInto*/, int32_t /*_pos*/, UErrorCode& /*status*/) const {}
- virtual int64_t transformNumber(int64_t /*number*/) const { return 0; }
- virtual double transformNumber(double /*number*/) const { return 0; }
- virtual UBool doParse(const UnicodeString& /*text*/,
- ParsePosition& /*parsePosition*/,
- double baseValue,
- double /*upperBound*/,
- UBool /*lenientParse*/,
- Formattable& result) const
- { result.setDouble(baseValue); return TRUE; }
- virtual double composeRuleValue(double /*newRuleValue*/, double /*oldRuleValue*/) const { return 0.0; } // never called
- virtual double calcUpperBound(double /*oldUpperBound*/) const { return 0; } // never called
- virtual UBool isNullSubstitution() const { return TRUE; }
- virtual UChar tokenChar() const { return (UChar)0x0020; } // ' ' never called
-
-public:
- static UClassID getStaticClassID(void);
- virtual UClassID getDynamicClassID(void) const;
-};
-
-NullSubstitution::~NullSubstitution() {}
-