From 0a2bd99c850147be8fac5badff2ff737a2113efe Mon Sep 17 00:00:00 2001 From: Younies Mahmoud Date: Fri, 13 Mar 2020 17:26:20 +0100 Subject: [PATCH] add units router --- icu4c/source/i18n/unitsrouter.cpp | 0 icu4c/source/i18n/unitsrouter.h | 33 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 icu4c/source/i18n/unitsrouter.cpp create mode 100644 icu4c/source/i18n/unitsrouter.h diff --git a/icu4c/source/i18n/unitsrouter.cpp b/icu4c/source/i18n/unitsrouter.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/icu4c/source/i18n/unitsrouter.h b/icu4c/source/i18n/unitsrouter.h new file mode 100644 index 00000000000..6d7abf5d41d --- /dev/null +++ b/icu4c/source/i18n/unitsrouter.h @@ -0,0 +1,33 @@ +// © 2020 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING +#ifndef __UNITSROUTER_H__ +#define __UNITSROUTER_H__ + +#include "unicode/errorcode.h" +#include "unicode/measunit.h" +#include "unicode/measure.h" +#include "unicode/stringpiece.h" + +U_NAMESPACE_BEGIN + +class UnitConverter; + +class U_I18N_API UnitsRouter { + public: + UnitsRouter(MeasureUnit inputUnit, Locale locale, StringPiece usage); + + LocalArray route(double quantity, UErrorCode &status); + + private: + LocalArray unitsConverters; +}; + +U_NAMESPACE_END + +#endif //__UNITSROUTER_H__ + +#endif /* #if !UCONFIG_NO_FORMATTING */ -- 2.40.0