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::LocalPointerBase
"Smart pointer" base class; do not use directly: use LocalPointer etc.
Definition localpointer.h:68
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.