"Fossies" - the Fresh Open Source Software Archive

Member "icu/source/i18n/nounit.cpp" (22 Apr 2020, 698 Bytes) of package /linux/misc/icu4c-67_1-src.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "nounit.cpp" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes reports: 67rc_vs_67_1 or 66_1_vs_67_1.

    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 
   11 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(NoUnit)
   12 
   13 NoUnit U_EXPORT2 NoUnit::base() {
   14     return NoUnit("");
   15 }
   16 
   17 NoUnit U_EXPORT2 NoUnit::percent() {
   18     return NoUnit("percent");
   19 }
   20 
   21 NoUnit U_EXPORT2 NoUnit::permille() {
   22     return NoUnit("permille");
   23 }
   24 
   25 NoUnit::NoUnit(const char* subtype) {
   26     initNoUnit(subtype);
   27 }
   28 
   29 NoUnit::NoUnit(const NoUnit& other) : MeasureUnit(other) {
   30 }
   31 
   32 NoUnit* NoUnit::clone() const {
   33     return new NoUnit(*this);
   34 }
   35 
   36 NoUnit::~NoUnit() {
   37 }
   38 
   39 
   40 U_NAMESPACE_END
   41 
   42 #endif