haiku/headers/private/libroot/locale/ICUMonetaryData.h
Oliver Tappe a3f665982e * reintegrated posix-locale
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 23:13:00 +00:00

70 lines
1.9 KiB
C++

/*
* Copyright 2010, Oliver Tappe, zooey@hirschkaefer.de.
* Distributed under the terms of the MIT License.
*/
#ifndef _ICU_MONETARY_DATA_H
#define _ICU_MONETARY_DATA_H
#include "ICULocaleconvData.h"
#include "LocaleBackend.h"
#include <locale.h>
namespace BPrivate {
class ICUMonetaryData : public ICULocaleconvData {
typedef ICULocaleconvData inherited;
public:
static const int32 kParenthesesAroundCurrencyAndValue = 0;
static const int32 kSignPrecedesCurrencyAndValue = 1;
static const int32 kSignSucceedsCurrencyAndValue = 2;
static const int32 kSignImmediatelyPrecedesCurrency = 3;
static const int32 kSignImmediatelySucceedsCurrency = 4;
ICUMonetaryData(struct lconv& localeConv);
void Initialize(
LocaleMonetaryDataBridge* dataBridge);
virtual status_t SetTo(const Locale& locale,
const char* posixLocaleName);
virtual status_t SetToPosix();
const char* GetLanginfo(int index);
private:
static const int32 kCsPrecedesFlag = 1 << 0;
static const int32 kSepBySpaceFlag = 1 << 1;
int32 _DetermineCurrencyPosAndSeparator(
const UnicodeString& prefix,
const UnicodeString& suffix,
const UnicodeString& signSymbol,
const UnicodeString& currencySymbol,
UChar& currencySeparatorChar);
int32 _DetermineSignPos(const UnicodeString& prefix,
const UnicodeString& suffix,
const UnicodeString& signSymbol,
const UnicodeString& currencySymbol);
char fDecimalPoint[skLCBufSize];
char fThousandsSep[skLCBufSize];
char fGrouping[skLCBufSize];
char fIntCurrSymbol[skLCBufSize];
char fCurrencySymbol[skLCBufSize];
char fPositiveSign[skLCBufSize];
char fNegativeSign[skLCBufSize];
struct lconv& fLocaleConv;
const struct lconv* fPosixLocaleConv;
};
} // namespace BPrivate
#endif // _ICU_MONETARY_DATA_H