2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FLcl_DateTimeSymbolsImpl.h
20 * @brief This is the header file for the _DateTimeSymbolsImpl class.
22 * This header file contains the declarations of the _DateTimeSymbolsImpl class.
25 #ifndef _FLCL_INTERNAL_DATE_TIME_SYMBOLS_IMPL_H_
26 #define _FLCL_INTERNAL_DATE_TIME_SYMBOLS_IMPL_H_
30 #include <unicode/dtfmtsym.h>
32 #include <FBaseColArrayList.h>
33 #include <FBaseColHashMap.h>
34 #include <FLclLocale.h>
35 #include <FLclCalendar.h>
38 namespace Tizen { namespace Locales
41 class DateTimeSymbols;
43 enum DateFormatSymbolsAttributes
45 DATE_FORMAT_SYM_ERA_LIST,
46 DATE_FORMAT_SYM_MONTH_LIST,
47 DATE_FORMAT_SYM_SHORT_MONTH_LIST,
48 DATE_FORMAT_SYM_WEEKDAY_LIST,
49 DATE_FORMAT_SYM_SHORT_WEEKDAY_LIST,
50 DATE_FORMAT_SYM_AM_PM_LIST,
51 DATE_FORMAT_SYM_TIMEZONE_MAP,
53 DATE_FORMAT_SYM_INVALID
56 class _DateTimeSymbolsImpl
57 : public Tizen::Base::Object
61 // Construct Operations
62 _DateTimeSymbolsImpl(void);
63 virtual ~_DateTimeSymbolsImpl(void);
65 result Initialize(CalendarType calendarType = CALENDAR_GREGORIAN);
66 result Initialize(const Locale& locale, CalendarType calendarType = CALENDAR_GREGORIAN);
67 void Set(const _DateTimeSymbolsImpl* other);
70 result AddTimeZoneName(const Tizen::Base::String& timeZoneId, const Tizen::Base::String& concatenatedTimeZoneName, bool isOverwrite = false);
72 const Tizen::Base::Collection::IList* GetEras(void) const;
73 result SetEras(const Tizen::Base::String& eras);
74 const Tizen::Base::Collection::IList* GetMonths(void) const;
75 result SetMonths(const Tizen::Base::String& months);
76 const Tizen::Base::Collection::IList* GetShortMonths(void) const;
77 result SetShortMonths(const Tizen::Base::String& shortMonths);
78 const Tizen::Base::Collection::IList* GetWeekdays(void) const;
79 result SetWeekdays(const Tizen::Base::String& weekdays);
80 const Tizen::Base::Collection::IList* GetShortWeekdays(void) const;
81 result SetShortWeekdays(const Tizen::Base::String& shortWeekdays);
82 const Tizen::Base::Collection::IList* GetAmPm(void) const;
83 result SetAmPm(const Tizen::Base::String& amPm);
85 Tizen::Base::String GetTimeZoneName(Tizen::Base::String& timeZoneId, int timeZoneStyle = 0);
86 result SetTimeZoneName(const Tizen::Base::String& timeZoneId, const Tizen::Base::String& concatenatedTimeZoneName);
88 Tizen::Base::Collection::IList* CloneArrayListN(const Tizen::Base::Collection::IList* pList) const;
89 Tizen::Base::Collection::IMultiMap* CloneMultiHashMapN(const Tizen::Base::Collection::IMultiMap* pMap) const;
90 result SetList(Tizen::Base::Collection::ArrayList* pArraylist, int tokenCount, const Tizen::Base::String& stringWillBeTokenized);
92 void ReleaseList(Tizen::Base::Collection::IList* pList);
95 static _DateTimeSymbolsImpl* GetDateTimeSymbolsImpl(DateTimeSymbols* pDateTimeSymbols);
98 _DateTimeSymbolsImpl(const _DateTimeSymbolsImpl& dateTimeSymbolsImpl);
99 _DateTimeSymbolsImpl& operator =(const _DateTimeSymbolsImpl& dateTimeSymbolsImpl);
102 Tizen::Base::Collection::IList* __pErasList;
103 Tizen::Base::Collection::IList* __pMonthsList;
104 Tizen::Base::Collection::IList* __pShortMonthsList;
105 Tizen::Base::Collection::IList* __pWeekdaysList;
106 Tizen::Base::Collection::IList* __pShortWeekdaysList;
107 Tizen::Base::Collection::IList* __pAmPmList;
108 Tizen::Base::Collection::IMultiMap* __pTimeZonesMap;
109 U_ICU_NAMESPACE::DateFormatSymbols* __pIcuDateFormatSymbols;
111 CalendarType __CalendarType;
113 friend class DateTimeSymbols;
114 friend class DateTimeFormatter;
115 friend class _LocaleData;
116 }; // _DateTimeSymbolsImpl
120 #endif //_FLCL_INTERNAL_DATE_TIME_SYMBOLS_IMPL_H_