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_DateTimeSymbolsImpl.h
19 * @brief This is the header file for the _DateTimeSymbolsImpl class.
21 * This header file contains the declarations of the _DateTimeSymbolsImpl class.
24 #ifndef _FLCL_INTERNAL_DATE_TIME_SYMBOLS_IMPL_H_
25 #define _FLCL_INTERNAL_DATE_TIME_SYMBOLS_IMPL_H_
29 #include <unicode/dtfmtsym.h>
31 #include <FBaseColArrayList.h>
32 #include <FBaseColHashMap.h>
33 #include <FLclLocale.h>
34 #include <FLclCalendar.h>
36 namespace U_ICU_NAMESPACE
39 class DateFormatSymbols;
42 namespace Tizen { namespace Locales
45 class DateTimeSymbols;
47 enum DateFormatSymbolsAttributes
49 DATE_FORMAT_SYM_ERA_LIST,
50 DATE_FORMAT_SYM_MONTH_LIST,
51 DATE_FORMAT_SYM_SHORT_MONTH_LIST,
52 DATE_FORMAT_SYM_WEEKDAY_LIST,
53 DATE_FORMAT_SYM_SHORT_WEEKDAY_LIST,
54 DATE_FORMAT_SYM_AM_PM_LIST,
55 DATE_FORMAT_SYM_TIMEZONE_MAP,
57 DATE_FORMAT_SYM_INVALID
60 class _DateTimeSymbolsImpl
61 : public Tizen::Base::Object
65 _DateTimeSymbolsImpl(void);
66 virtual ~_DateTimeSymbolsImpl(void);
68 result Initialize(CalendarType calendarType = CALENDAR_GREGORIAN);
69 result Initialize(const Locale& locale, CalendarType calendarType = CALENDAR_GREGORIAN);
70 void Set(const _DateTimeSymbolsImpl* other);
73 result AddTimeZoneName(const Tizen::Base::String& timeZoneId, const Tizen::Base::String& concatenatedTimeZoneName, bool isOverwrite = false);
75 const Tizen::Base::Collection::IList* GetEras(void) const;
76 result SetEras(const Tizen::Base::String& eras);
77 const Tizen::Base::Collection::IList* GetMonths(void) const;
78 result SetMonths(const Tizen::Base::String& months);
79 const Tizen::Base::Collection::IList* GetShortMonths(void) const;
80 result SetShortMonths(const Tizen::Base::String& shortMonths);
81 const Tizen::Base::Collection::IList* GetWeekdays(void) const;
82 result SetWeekdays(const Tizen::Base::String& weekdays);
83 const Tizen::Base::Collection::IList* GetShortWeekdays(void) const;
84 result SetShortWeekdays(const Tizen::Base::String& shortWeekdays);
85 const Tizen::Base::Collection::IList* GetAmPm(void) const;
86 result SetAmPm(const Tizen::Base::String& amPm);
88 Tizen::Base::String GetTimeZoneName(Tizen::Base::String& timeZoneId, int timeZoneStyle = 0);
89 result SetTimeZoneName(const Tizen::Base::String& timeZoneId, const Tizen::Base::String& concatenatedTimeZoneName);
91 Tizen::Base::Collection::IList* CloneArrayListN(const Tizen::Base::Collection::IList* pList) const;
92 Tizen::Base::Collection::IMultiMap* CloneMultiHashMapN(const Tizen::Base::Collection::IMultiMap* pMap) const;
93 result SetList(Tizen::Base::Collection::ArrayList* pArraylist, int tokenCount, const Tizen::Base::String& stringWillBeTokenized);
95 void ReleaseList(Tizen::Base::Collection::IList* pList);
98 U_ICU_NAMESPACE::DateFormatSymbols* GetIcuSymbols(void);
99 static _DateTimeSymbolsImpl* GetDateTimeSymbolsImpl(DateTimeSymbols* pDateTimeSymbols);
102 _DateTimeSymbolsImpl(const _DateTimeSymbolsImpl& dateTimeSymbolsImpl);
103 _DateTimeSymbolsImpl& operator =(const _DateTimeSymbolsImpl& dateTimeSymbolsImpl);
105 Tizen::Base::Collection::IList* GetSymbolAttributeArrayN(DateFormatSymbolsAttributes attributeName);
108 Tizen::Base::Collection::IList* __pErasList;
109 Tizen::Base::Collection::IList* __pMonthsList;
110 Tizen::Base::Collection::IList* __pShortMonthsList;
111 Tizen::Base::Collection::IList* __pWeekdaysList;
112 Tizen::Base::Collection::IList* __pShortWeekdaysList;
113 Tizen::Base::Collection::IList* __pAmPmList;
114 Tizen::Base::Collection::IMultiMap* __pTimeZonesMap;
115 U_ICU_NAMESPACE::DateFormatSymbols* __pIcuDateFormatSymbols;
117 CalendarType __CalendarType;
119 friend class DateTimeSymbols;
120 friend class DateTimeFormatter;
121 friend class _LocaleData;
122 }; // _DateTimeSymbolsImpl
126 #endif //_FLCL_INTERNAL_DATE_TIME_SYMBOLS_IMPL_H_