2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FLcl_LocaleData.h
19 * @brief This is the header file for _LocaleData class.
21 #ifndef _FLCL_INTERNAL_LOCALE_DATA_H_
22 #define _FLCL_INTERNAL_LOCALE_DATA_H_
25 #include <unicode/locid.h>
26 #include <unicode/decimfmt.h>
27 #include <unicode/calendar.h>
28 #include <unicode/gregocal.h>
29 #include <FLclLocale.h>
30 #include <FBaseDateTime.h>
31 #include <FBaseString.h>
32 #include <FBaseColHashMap.h>
33 #include <FBaseColArrayList.h>
34 #include "FLcl_NumberFormatterImpl.h"
35 #include "FLcl_FieldPosition.h"
38 typedef UParseError IcuUParseError;
39 typedef UDate IcuUDate;
40 typedef UChar IcuUChar;
42 typedef U_ICU_NAMESPACE::UnicodeString IcuUnicodeString;
43 typedef U_ICU_NAMESPACE::StringEnumeration IcuStringEnumeration;
44 typedef U_ICU_NAMESPACE::Locale IcuLocale;
45 typedef U_ICU_NAMESPACE::DecimalFormatSymbols IcuDecimalFormatSymbols;
46 typedef U_ICU_NAMESPACE::Calendar IcuCalendar;
47 typedef U_ICU_NAMESPACE::GregorianCalendar IcuGregorianCalendar;
48 typedef U_ICU_NAMESPACE::NumberFormat IcuNumberFormat;
49 typedef U_ICU_NAMESPACE::DecimalFormat IcuDecimalFormat;
50 typedef U_ICU_NAMESPACE::FieldPosition IcuFieldPosition;
52 namespace Tizen { namespace Locales
57 * @brief This class is for loading the @e locale data.
60 * _LocaleData is represented locale data which is specific localized.
61 * This class is used by other classed in locale namespace to load the localized data.
66 : public Tizen::Base::Object
69 static Tizen::Base::String GetOspString(const IcuUnicodeString& icuStr);
70 static U_ICU_NAMESPACE::UnicodeString GetIcuString(const Tizen::Base::String& ospString);
72 static IcuUnicodeString* ConvertOspArrayToIcuStringArrayN(const Tizen::Base::Collection::IList* pIcuStrList, int& count);
73 static Tizen::Base::Collection::ArrayList* ConvertIcuStringArrayToOspArrayN(const IcuUnicodeString* pIcuStrList, int count);
75 static IcuUDate GetIcuDate(Tizen::Base::DateTime date);
76 static IcuFieldPosition GetIcuFieldPosition(_FieldPosition pos);
77 static IcuLocale GetIcuLocale(const Tizen::Locales::Locale& ospLocale);
81 virtual ~_LocaleData(void);
82 _LocaleData(const _LocaleData& localeData);
83 _LocaleData& operator =(const _LocaleData& localeData);
89 #endif // _FLCL_INTERNAL_LOCALE_DATA_H_