ICU 76.1: i18n/unicode/nounit.h Source File

ICU 76.1 76.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 U_SHOW_CPLUSPLUS_API
16
17 #if !UCONFIG_NO_FORMATTING
18
19 #include "unicode/measunit.h"
20
26 U_NAMESPACE_BEGIN
27
34 namespace NoUnit {
45 static inline MeasureUnit U_EXPORT2 base() {
46 return {};
47 }
48
59 static inline MeasureUnit U_EXPORT2 percent() {
60 return MeasureUnit::getPercent();
61 }
62
73 static inline MeasureUnit U_EXPORT2 permille() {
74 return MeasureUnit::getPermille();
75 }
76 }
77
78 U_NAMESPACE_END
79
80 #endif /* #if !UCONFIG_NO_FORMATTING */
81
82 #endif /* U_SHOW_CPLUSPLUS_API */
83
84 #endif // __NOUNIT_H__
85 //eof
86 //
icu::MeasureUnit
A unit such as length, mass, volume, currency, etc.
Definition: measunit.h:409
measunit.h
C++ API: A unit for measuring a quantity.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.