ICU 69.1 69.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
21#ifndef U_HIDE_DRAFT_API
22
28U_NAMESPACE_BEGIN
29
36namespace NoUnit {
47 static inline MeasureUnit U_EXPORT2 base() {
48 return MeasureUnit();
49 }
50
61 static inline MeasureUnit U_EXPORT2 percent() {
62 return MeasureUnit::getPercent();
63 }
64
75 static inline MeasureUnit U_EXPORT2 permille() {
76 return MeasureUnit::getPermille();
77 }
78}
79
81
82#endif /* U_HIDE_DRAFT_API */
83#endif /* #if !UCONFIG_NO_FORMATTING */
84
85#endif /* U_SHOW_CPLUSPLUS_API */
86
87#endif // __NOUNIT_H__
88//eof
89//
"Smart pointer" base class; do not use directly: use LocalPointer etc.
A unit such as length, mass, volume, currency, etc.
Definition measunit.h:369
C++ API: A unit for measuring a quantity.
Basic definitions for ICU, for both C and C++ APIs.