1 // © 2017 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 4 #include "unicode/nounit.h" 5 #include "uassert.h" 6 7 #if !UCONFIG_NO_FORMATTING 8 9 U_NAMESPACE_BEGIN 10 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(NoUnit)11UOBJECT_DEFINE_RTTI_IMPLEMENTATION(NoUnit) 12 13 NoUnit U_EXPORT2 NoUnit::base() { 14 return NoUnit("base"); 15 } 16 percent()17NoUnit U_EXPORT2 NoUnit::percent() { 18 return NoUnit("percent"); 19 } 20 permille()21NoUnit U_EXPORT2 NoUnit::permille() { 22 return NoUnit("permille"); 23 } 24 NoUnit(const char * subtype)25NoUnit::NoUnit(const char* subtype) { 26 initNoUnit(subtype); 27 } 28 NoUnit(const NoUnit & other)29NoUnit::NoUnit(const NoUnit& other) : MeasureUnit(other) { 30 } 31 clone() const32UObject* NoUnit::clone() const { 33 return new NoUnit(*this); 34 } 35 ~NoUnit()36NoUnit::~NoUnit() { 37 } 38 39 40 U_NAMESPACE_END 41 42 #endif 43