Make UEFI boot-platform build again
[haiku.git] / headers / private / libroot / locale / ICUMonetaryData.h
blob685bac73ca5e8201839cdbeda6f8ed75e055cc7d
1 /*
2 * Copyright 2010-2011, Oliver Tappe, zooey@hirschkaefer.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _ICU_MONETARY_DATA_H
6 #define _ICU_MONETARY_DATA_H
9 #include "ICULocaleconvData.h"
10 #include "LocaleBackend.h"
12 #include <locale.h>
15 namespace BPrivate {
16 namespace Libroot {
19 class ICUMonetaryData : public ICULocaleconvData {
20 typedef ICULocaleconvData inherited;
22 public:
23 static const int32 kParenthesesAroundCurrencyAndValue = 0;
24 static const int32 kSignPrecedesCurrencyAndValue = 1;
25 static const int32 kSignSucceedsCurrencyAndValue = 2;
26 static const int32 kSignImmediatelyPrecedesCurrency = 3;
27 static const int32 kSignImmediatelySucceedsCurrency = 4;
29 ICUMonetaryData(pthread_key_t tlsKey,
30 struct lconv& localeConv);
32 void Initialize(
33 LocaleMonetaryDataBridge* dataBridge);
35 virtual status_t SetTo(const Locale& locale,
36 const char* posixLocaleName);
37 virtual status_t SetToPosix();
39 const char* GetLanginfo(int index);
41 private:
42 static const int32 kCsPrecedesFlag = 1 << 0;
43 static const int32 kSepBySpaceFlag = 1 << 1;
45 int32 _DetermineCurrencyPosAndSeparator(
46 const UnicodeString& prefix,
47 const UnicodeString& suffix,
48 const UnicodeString& signSymbol,
49 const UnicodeString& currencySymbol,
50 UChar& currencySeparatorChar);
51 int32 _DetermineSignPos(const UnicodeString& prefix,
52 const UnicodeString& suffix,
53 const UnicodeString& signSymbol,
54 const UnicodeString& currencySymbol);
56 char fDecimalPoint[skLCBufSize];
57 char fThousandsSep[skLCBufSize];
58 char fGrouping[skLCBufSize];
59 char fIntCurrSymbol[skLCBufSize];
60 char fCurrencySymbol[skLCBufSize];
61 char fPositiveSign[skLCBufSize];
62 char fNegativeSign[skLCBufSize];
64 struct lconv& fLocaleConv;
65 const struct lconv* fPosixLocaleConv;
69 } // namespace Libroot
70 } // namespace BPrivate
73 #endif // _ICU_MONETARY_DATA_H