ICU 62.1 62.1
nounit.h
Go to the documentation of this file.
1// © 2017 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3/*
4 *******************************************************************************
5 * Copyright (C) 2009-2017, International Business Machines Corporation, *
6 * Google, and others. All Rights Reserved. *
7 *******************************************************************************
8 */
9
10#ifndef __NOUNIT_H__
11#define __NOUNIT_H__
12
13#include "unicode/utypes.h"
14
15#if !UCONFIG_NO_FORMATTING
16
17#include "unicode/measunit.h"
18
25
26#ifndef U_HIDE_DRAFT_API
33public:
41
49
57
63
68 virtual ~NoUnit();
69
75 virtual UObject* clone() const;
76
85 virtual UClassID getDynamicClassID() const;
86
94
95private:
100 NoUnit(const char* subtype);
101
102};
103#endif /* U_HIDE_DRAFT_API */
104
106
107#endif /* #if !UCONFIG_NO_FORMATTING */
108
109#endif // __NOUNIT_H__
110//eof
111//
"Smart pointer" base class; do not use directly: use LocalPointer etc.
A unit such as length, mass, volume, currency, etc.
Definition measunit.h:38
Dimensionless unit for percent and permille.
Definition nounit.h:32
static UClassID getStaticClassID()
Returns the class ID for this class.
NoUnit(const NoUnit &other)
Copy operator.
static NoUnit base()
Returns an instance for the base unit (dimensionless and no scaling).
static NoUnit percent()
Returns an instance for percent, or 1/100 of a base unit.
virtual UClassID getDynamicClassID() const
Returns a unique class ID for this object POLYMORPHICALLY.
virtual UObject * clone() const
Return a polymorphic clone of this object.
static NoUnit permille()
Returns an instance for permille, or 1/1000 of a base unit.
virtual ~NoUnit()
Destructor.
UObject is the common ICU "boilerplate" class.
Definition uobject.h:223
C++ API: A unit for measuring a quantity.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition uobject.h:93
Basic definitions for ICU, for both C and C++ APIs.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition utypes.h:360
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:138
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:137