Loading...
Searching...
No Matches
nounit.h
Go to the documentation of this file.
// © 2017 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2009-2017, International Business Machines Corporation, *
* Google, and others. All Rights Reserved. *
*******************************************************************************
*/
#ifndef __NOUNIT_H__
#define __NOUNIT_H__
#include "unicode/utypes.h"
#if U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_FORMATTING
#include "unicode/measunit.h"
U_NAMESPACE_BEGIN
namespace NoUnit {
static inline MeasureUnit U_EXPORT2 base() {
return {};
}
static inline MeasureUnit U_EXPORT2 percent() {
return MeasureUnit::getPercent();
}
static inline MeasureUnit U_EXPORT2 permille() {
return MeasureUnit::getPermille();
}
}
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // __NOUNIT_H__
//eof
//
icu::MeasureUnit
A unit such as length, mass, volume, currency, etc.
Definition measunit.h:405
icu::MeasureUnit::getPermille
static MeasureUnit getPermille()
Returns by value, unit of concentr: permille.
icu::MeasureUnit::getPercent
static MeasureUnit getPercent()
Returns by value, unit of concentr: percent.
measunit.h
C++ API: A unit for measuring a quantity.
icu::NoUnit
Dimensionless unit for percent and permille.
Definition nounit.h:34
utypes.h
Basic definitions for ICU, for both C and C++ APIs.