Merge "Fix N_SE-46938 for tz list." into tizen_2.2
[platform/framework/native/appfw.git] / src / locales / FLcl_DateTimeSymbolsImpl.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 //
16
17 /**
18  * @file        FLcl_DateTimeSymbolsImpl.cpp
19  * @brief       This is the implementation file for _DateTimeSymbolsImpl class.
20  */
21
22 #include <unique_ptr.h>
23
24 #include <FBaseSysLog.h>
25 #include <FLclDateTimeSymbols.h>
26 #include "FLcl_DateTimeSymbolsImpl.h"
27 #include "FLcl_LocaleData.h"
28 #include "FLcl_LocaleImpl.h"
29 #include "FLcl_LocaleManagerImpl.h"
30
31 using namespace Tizen::Base;
32 using namespace Tizen::Base::Collection;
33 using namespace Tizen::Base::Utility;
34
35 namespace Tizen { namespace Locales
36 {
37
38 static const int ERAS_COUNT = 2;
39 static const int MONTH_COUNT = 12;
40 static const int WEEKDAYS_COUNT = 7;
41 static const int AM_PM_COUNT =2;
42
43 static const int MAX_TIMEZONE_NAME = 4;
44
45 _DateTimeSymbolsImpl::_DateTimeSymbolsImpl(void)
46         : __pErasList(null)
47         , __pMonthsList(null)
48         , __pShortMonthsList(null)
49         , __pWeekdaysList(null)
50         , __pShortWeekdaysList(null)
51         , __pAmPmList(null)
52         , __pTimeZonesMap(null)
53         , __pIcuDateFormatSymbols(null)
54         , __CalendarType(CALENDAR_GREGORIAN)
55 {
56 }
57
58 _DateTimeSymbolsImpl::~_DateTimeSymbolsImpl(void)
59 {
60         ReleaseAll();
61         if (__pIcuDateFormatSymbols)
62         {
63                 delete __pIcuDateFormatSymbols;
64         }
65 }
66
67 result
68 _DateTimeSymbolsImpl::Initialize(CalendarType calendarType)
69 {
70         return Initialize(_LocaleManagerImpl::GetSystemLocale(), calendarType);
71 }
72
73 result
74 _DateTimeSymbolsImpl::Initialize(const Locale& locale, CalendarType calendarType)
75 {
76         SysTryReturnResult(NID_LCL, _LocaleImpl::IsSupported(locale), E_INVALID_ARG, "Given locale is not supported");
77
78         _LocaleData localeData;
79         result r = localeData.SetDateFormatSymbols(locale);   // this will set ICU DateTimeSymbol in _LocaleData object for future use
80
81         if (!IsFailed(r))
82         {
83                 __pErasList = localeData.GetDateFormatSymbolAttrArrayN(DATE_FORMAT_SYM_ERA_LIST);
84                 __pMonthsList = localeData.GetDateFormatSymbolAttrArrayN(DATE_FORMAT_SYM_MONTH_LIST);
85                 __pShortMonthsList = localeData.GetDateFormatSymbolAttrArrayN(DATE_FORMAT_SYM_SHORT_MONTH_LIST);
86                 __pWeekdaysList = localeData.GetDateFormatSymbolAttrArrayN(DATE_FORMAT_SYM_WEEKDAY_LIST);
87                 __pShortWeekdaysList = localeData.GetDateFormatSymbolAttrArrayN(DATE_FORMAT_SYM_SHORT_WEEKDAY_LIST);
88                 __pAmPmList = localeData.GetDateFormatSymbolAttrArrayN(DATE_FORMAT_SYM_AM_PM_LIST);
89                 __CalendarType = calendarType;
90
91                 UErrorCode ec = U_ZERO_ERROR;
92                 __pIcuDateFormatSymbols = new IcuDateFormatSymbols(ec);
93         }
94
95         return r;
96 }
97
98 void
99 _DateTimeSymbolsImpl::Set(const _DateTimeSymbolsImpl* pOther)
100 {
101         SysTryReturnVoidResult(NID_LCL, pOther != null, E_INVALID_ARG,
102                                 "[%s] Invalid argument is used. pOther instance is invalid", GetErrorMessage(E_INVALID_ARG));
103
104         __pErasList = CloneArrayListN(pOther->__pErasList);                         // Copying EraList
105         __pMonthsList = CloneArrayListN(pOther->__pMonthsList);                     // Copying Month List
106         __pShortMonthsList = CloneArrayListN(pOther->__pShortMonthsList);           // Copying Short Month List
107         __pWeekdaysList = CloneArrayListN(pOther->__pWeekdaysList);                 // Copying Weekdays List
108         __pShortWeekdaysList = CloneArrayListN(pOther->__pShortWeekdaysList);       // Copying Short Weekdays List
109         __pAmPmList = CloneArrayListN(pOther->__pAmPmList);                         // Copying AM/ PM String
110         if(pOther->__pTimeZonesMap)
111         {
112                 __pTimeZonesMap = CloneMultiHashMapN(pOther->__pTimeZonesMap);                   // Copying available TimeZone List
113         }
114         __CalendarType = pOther->__CalendarType;                                    // Copying Calendar Type
115 }
116
117
118 result
119 _DateTimeSymbolsImpl::AddTimeZoneName(const String& timeZoneId, const String& concatenatedTimeZoneName, bool isOverwrite)
120 {
121         StringTokenizer tokenizer(concatenatedTimeZoneName, L"|");
122         SysTryReturnResult(NID_LCL, (tokenizer.GetTokenCount() == MAX_TIMEZONE_NAME),
123                         E_INVALID_ARG, "Invalid argument is used. %ls is invalid.", concatenatedTimeZoneName.GetPointer());
124         result r;
125
126         if (!isOverwrite)
127         {
128                 String tzName(timeZoneId);
129                 GetTimeZoneName(tzName, 0);
130
131                 r = GetLastResult();
132                 SysTryReturnResult(NID_LCL, r != E_SUCCESS, E_OBJ_ALREADY_EXIST, "The timeZoneId already exists.");
133         }
134
135         if (!__pTimeZonesMap)
136         {
137                 MultiHashMap* pMultiHashMap = new (std::nothrow) MultiHashMap();
138                 SysTryReturnResult(NID_LCL, pMultiHashMap, E_OUT_OF_MEMORY, "Memory allocation failed.");
139                 pMultiHashMap->Construct();
140
141                 __pTimeZonesMap = (IMultiMap*) pMultiHashMap;
142         }
143
144         String token;
145         std::unique_ptr< String >pKey(new (std::nothrow) String(timeZoneId));
146         SysTryReturnResult(NID_LCL, pKey, E_OUT_OF_MEMORY, "Memory allocation failed");
147
148         r = E_OUT_OF_MEMORY;
149         while (tokenizer.HasMoreTokens())
150         {
151                 tokenizer.GetNextToken(token);
152                 std::unique_ptr< String >pValue(new (std::nothrow)String(token));
153                 if (pValue)
154                 {
155                         r = __pTimeZonesMap->Add(*pKey, *pValue);
156                         if (IsFailed(r))
157                         {
158                                 __pTimeZonesMap->Remove(*pKey,true);
159                                 return E_OUT_OF_MEMORY;
160                         }
161                         pValue.release();
162                 }
163         }
164
165         pKey.release();
166         return r;
167 }
168
169
170 const IList*
171 _DateTimeSymbolsImpl::GetAmPm(void) const
172 {
173         SysAssertf(__pAmPmList != null, "Not yet constructed! Construct() should be called before use");
174
175         ClearLastResult();  // Setting Last result to E_SUCCESS
176         return __pAmPmList;
177 }
178
179
180 result
181 _DateTimeSymbolsImpl::SetAmPm(const String& amPm)
182 {
183         SysAssertf(__pAmPmList != null, "Not yet constructed! Construct() should be called before use");
184
185         std::unique_ptr< ArrayList, AllElementsDeleter > pTempArrayList(new (std::nothrow) ArrayList());
186         SysTryReturnResult(NID_LCL, pTempArrayList != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
187
188         result r = SetList(pTempArrayList.get(), AM_PM_COUNT, amPm);
189         if (!IsFailed(r))
190         {
191                 __pAmPmList->RemoveAll(true);
192                 delete __pAmPmList;
193                 __pAmPmList = pTempArrayList.release();
194         }
195
196         return  r;
197 }
198
199 const IList*
200 _DateTimeSymbolsImpl::GetEras(void) const
201 {
202         SysAssertf(__pErasList != null, "Not yet constructed! Construct() should be called before use");
203         return __pErasList;
204 }
205
206 result
207 _DateTimeSymbolsImpl::SetEras(const String& eras)
208 {
209         SysAssertf(__pErasList != null, "Not yet constructed! Construct() should be called before use");
210
211         std::unique_ptr< ArrayList, AllElementsDeleter > pTempArrayList(new (std::nothrow) ArrayList());
212         SysTryReturnResult(NID_LCL, pTempArrayList != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
213
214         result r = SetList(pTempArrayList.get(), ERAS_COUNT, eras);
215         if (!IsFailed(r))
216         {
217                 __pErasList->RemoveAll(true);
218                 delete __pErasList;
219
220                 __pErasList = pTempArrayList.release();
221         }
222
223         return  r;
224 }
225
226 const IList*
227 _DateTimeSymbolsImpl::GetMonths(void) const
228 {
229         SysAssertf(__pMonthsList != null, "Not yet constructed! Construct() should be called before use");
230
231         ClearLastResult();   // Setting Last result to E_SUCCESS
232         return __pMonthsList;
233 }
234
235 result
236 _DateTimeSymbolsImpl::SetMonths(const String& months)
237 {
238         SysAssertf(__pMonthsList != null, "Not yet constructed! Construct() should be called before use");
239
240         std::unique_ptr< ArrayList, AllElementsDeleter > pTempArrayList(new (std::nothrow) ArrayList());
241         SysTryReturnResult(NID_LCL, pTempArrayList != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
242
243         result r = SetList(pTempArrayList.get(), MONTH_COUNT, months);
244         if (!IsFailed(r))
245         {
246                 __pMonthsList->RemoveAll(true);
247                 delete __pMonthsList;
248
249                 __pMonthsList = pTempArrayList.release();
250         }
251
252         return  r;
253 }
254 const IList*
255 _DateTimeSymbolsImpl::GetShortMonths(void) const
256 {
257         SysAssertf(__pShortMonthsList != null, "Not yet constructed! Construct() should be called before use");
258
259         ClearLastResult();  // Setting Last result to E_SUCCESS
260         return __pShortMonthsList;
261 }
262
263 result
264 _DateTimeSymbolsImpl::SetShortMonths(const String& shortMonths)
265 {
266         SysAssertf(__pShortMonthsList != null, "Not yet constructed! Construct() should be called before use");
267
268         std::unique_ptr< ArrayList, AllElementsDeleter > pTempArrayList(new (std::nothrow) ArrayList());
269         SysTryReturnResult(NID_LCL, pTempArrayList != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
270
271         result r = SetList(pTempArrayList.get(), MONTH_COUNT, shortMonths);
272         if (!IsFailed(r))
273         {
274                 __pShortMonthsList->RemoveAll(true);
275                 delete __pShortMonthsList;
276
277                 __pShortMonthsList = pTempArrayList.release();
278         }
279
280         return  r;
281 }
282
283 const IList*
284 _DateTimeSymbolsImpl::GetWeekdays(void) const
285 {
286         SysAssertf(__pWeekdaysList != null, "Not yet constructed! Construct() should be called before use");
287
288         ClearLastResult();          // Setting Last result to E_SUCCESS
289         return __pWeekdaysList;
290 }
291
292 result
293 _DateTimeSymbolsImpl::SetWeekdays(const String& weekdays)
294 {
295         SysAssertf(__pWeekdaysList != null, "Not yet constructed! Construct() should be called before use");
296
297         std::unique_ptr< ArrayList, AllElementsDeleter > pTempArrayList(new (std::nothrow) ArrayList());
298         SysTryReturnResult(NID_LCL, pTempArrayList != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
299
300         result r = SetList(pTempArrayList.get(), WEEKDAYS_COUNT, weekdays);
301         if (!IsFailed(r))
302         {
303                 __pWeekdaysList->RemoveAll(true);
304                 delete __pWeekdaysList;
305
306                 __pWeekdaysList = pTempArrayList.release();
307         }
308
309         return  r;
310 }
311
312
313 const IList*
314 _DateTimeSymbolsImpl::GetShortWeekdays(void) const
315 {
316         SysAssertf(__pShortWeekdaysList != null, "Not yet constructed! Construct() should be called before use");
317
318         ClearLastResult();          // Setting Last result to E_SUCCESS
319         return __pShortWeekdaysList;
320 }
321
322 result
323 _DateTimeSymbolsImpl::SetShortWeekdays(const String& shortWeekdays)
324 {
325         SysAssertf(__pShortWeekdaysList != null, "Not yet constructed! Construct() should be called before use");
326
327         std::unique_ptr< ArrayList, AllElementsDeleter > pTempArrayList(new (std::nothrow) ArrayList());
328         SysTryReturnResult(NID_LCL, pTempArrayList != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
329
330         result r = SetList(pTempArrayList.get(), WEEKDAYS_COUNT, shortWeekdays);
331         if (!IsFailed(r))
332         {
333                 __pShortWeekdaysList->RemoveAll(true);
334                 delete __pShortWeekdaysList;
335
336                 __pShortWeekdaysList = pTempArrayList.release();
337         }
338
339         return  r;
340 }
341
342
343 String
344 _DateTimeSymbolsImpl::GetTimeZoneName(Tizen::Base::String& timeZoneId, int timeZoneStyle)
345 {
346         SysTryReturn(NID_LCL, timeZoneStyle < MAX_TIMEZONE_NAME, String(), E_INVALID_ARG,
347                         "[%s] Invalid argument is used. timeZoneStyle(%d) is grater than MAX_TIMEZONE_NAME", GetErrorMessage(E_INVALID_ARG), timeZoneStyle);
348
349         ClearLastResult();
350
351         if (__pTimeZonesMap)
352         {
353                 std::unique_ptr< IEnumerator >pValueEnum(__pTimeZonesMap->GetValuesN(timeZoneId));
354
355                 if (pValueEnum != null)
356                 {
357                         int i = 0;
358                         String timeZoneName;
359                         while(pValueEnum->MoveNext() == E_SUCCESS)
360                         {
361                                 if (i++ == timeZoneStyle)
362                                 {
363                                         timeZoneName = *(static_cast<String*> (pValueEnum->GetCurrent()));
364                                 }
365                         }
366                         SetLastResult(E_SUCCESS);
367                         return timeZoneName;
368                 }
369         }
370
371         const IcuUnicodeString** pIcuMap = null;
372
373         int rowCount = 0;
374         int columnCount = 0;
375
376         pIcuMap = __pIcuDateFormatSymbols->getZoneStrings(rowCount, columnCount);
377         if (pIcuMap && rowCount && columnCount)
378         {
379                 for (int rc = 0; rc < rowCount; rc++)
380                 {
381                         if (timeZoneId == _LocaleData::GetOspString(pIcuMap[rc][0]))
382                         {
383                                 SetLastResult(E_SUCCESS);
384                                 return _LocaleData::GetOspString(pIcuMap[rc][timeZoneStyle+1]);
385                         }
386                 }
387         }
388         SetLastResult(E_OBJ_NOT_FOUND);
389         return String();
390 }
391
392 result
393 _DateTimeSymbolsImpl::SetTimeZoneName(const Tizen::Base::String& timeZoneId, const Tizen::Base::String& concatenatedTimeZoneName)
394 {
395         // checking if concatenatedTimeZoneName has 4 names
396         StringTokenizer tokenizer(concatenatedTimeZoneName, L"|");
397         SysTryReturnResult(NID_LCL, (tokenizer.GetTokenCount() == MAX_TIMEZONE_NAME),
398                         E_INVALID_ARG, "Invalid argument is used. %ls is invalid.", concatenatedTimeZoneName.GetPointer());
399
400         if (__pTimeZonesMap)
401         {
402                 bool check = true;
403                 __pTimeZonesMap->ContainsKey(timeZoneId, check);                           // checking if Time zone is already exist
404
405                 if (check)
406                 {
407                         __pTimeZonesMap->Remove(timeZoneId, true);
408                         return AddTimeZoneName(timeZoneId, concatenatedTimeZoneName, true);
409                 }
410         }
411
412         String tzName(timeZoneId);
413         GetTimeZoneName(tzName, 0);
414
415         result r = GetLastResult();
416
417         if(!IsFailed(r))
418         {
419                 return AddTimeZoneName(timeZoneId, concatenatedTimeZoneName, true);
420         }
421         return E_OBJ_NOT_FOUND;
422 }
423
424
425 // internal function
426 // This function makes a copy of input array list of strings
427 IList*
428 _DateTimeSymbolsImpl::CloneArrayListN(const IList* pList) const
429 {
430         SysTryReturn(NID_LCL, pList, null, E_INVALID_ARG, "[%s] Invalid argument is used. pList is Null", GetErrorMessage(E_INVALID_ARG));
431
432         ClearLastResult();  // Setting last result to E_SUCCESS
433         std::unique_ptr< ArrayList, AllElementsDeleter > pClonedArrayList(new (std::nothrow) ArrayList());
434         SysTryReturn(NID_LCL, pClonedArrayList, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed", GetErrorMessage(E_OUT_OF_MEMORY));
435
436         result r = pClonedArrayList->Construct(pList->GetCount());
437         SysTryReturn(NID_LCL, !IsFailed(r), null, r, "[%s] Unable to construct ArrayList.", GetErrorMessage(r));
438
439         for (int i = 0; i < pList->GetCount(); i++)
440         {
441                 std::unique_ptr< String > pClonedString(new (std::nothrow) String(*(static_cast<const String*>(pList->GetAt(i)))));
442                 SysTryReturn(NID_LCL, pClonedString, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed", GetErrorMessage(E_OUT_OF_MEMORY));
443
444                 r = pClonedArrayList->Add(pClonedString.get());
445                 SysTryReturn(NID_LCL, !IsFailed(r), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed", GetErrorMessage(E_OUT_OF_MEMORY));
446
447                 pClonedString.release();
448         }
449
450         return pClonedArrayList.release();
451 }
452
453
454
455 IMultiMap*
456 _DateTimeSymbolsImpl::CloneMultiHashMapN(const Tizen::Base::Collection::IMultiMap* pMultiMap) const
457 {
458         SysTryReturn(NID_LCL, pMultiMap, null, E_INVALID_ARG, "[%s] Invalid argument is used. pMultiMap is null.", GetErrorMessage(E_INVALID_ARG));
459
460         ClearLastResult();
461
462         std::unique_ptr< MultiHashMap, AllElementsDeleter > pClonedMultiHashMap(new (std::nothrow) MultiHashMap());
463         SysTryReturn(NID_LCL, pClonedMultiHashMap, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
464
465         result r = pClonedMultiHashMap->Construct();
466         SysTryReturn(NID_LCL, !IsFailed(r), null, r, "[%s] Unable to construct hash map.", GetErrorMessage(r));
467
468         std::unique_ptr< IList > pKeys(pMultiMap->GetKeysN());
469         r = GetLastResult();
470         SysTryReturn(NID_LCL, pKeys != null, null, r, "[%s] Unable to get key list.", GetErrorMessage(r));
471
472         for (int i = 0; i < pKeys->GetCount(); i++)
473         {
474                 String* pKey = static_cast< String* >(pKeys->GetAt(i));
475                 SysTryReturn(NID_LCL, pKey != null, null, r, "[%s] Propagated.", GetLastResult());
476
477                 std::unique_ptr< IEnumerator > pValueEnum(pMultiMap->GetValuesN(*pKey));
478                 r = GetLastResult();
479                 SysTryReturn(NID_LCL, pValueEnum != null, null, r, "[%s] Unable to get values for key.", GetErrorMessage(r));
480
481                 std::unique_ptr< String > pMapKey(new (std::nothrow)String(*pKey));
482                 SysTryReturn(NID_LCL, pMapKey != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
483
484                 while (pValueEnum->MoveNext() == E_SUCCESS)
485                 {
486                         std::unique_ptr< String > pTimeZoneName(new (std::nothrow) String(*(static_cast<String*> (pValueEnum->GetCurrent()))));
487                         if (pTimeZoneName)
488                         {
489                                 r = pClonedMultiHashMap->Add(pMapKey.get(), pTimeZoneName.get());
490                                 if (IsFailed(r))
491                                 {
492                                         pClonedMultiHashMap->Remove(*pMapKey,true);
493                                         break;
494                                 }
495
496                                 pTimeZoneName.release();
497                         }
498                         else
499                         {
500                                 pClonedMultiHashMap->Remove(*pMapKey,true);
501                                 break;
502                         }
503                 }
504
505                 pMapKey.release();
506         }
507
508         return pClonedMultiHashMap.release();
509 }
510
511 result
512 _DateTimeSymbolsImpl::SetList(Tizen::Base::Collection::ArrayList* pArrayList, int tokenCount, const Tizen::Base::String& stringWillBeTokenized)
513 {
514         StringTokenizer tokenizer(stringWillBeTokenized, L"|");
515
516         SysTryReturnResult(NID_LCL, (tokenizer.GetTokenCount() == tokenCount), E_INVALID_ARG,
517                                 "Invalid argument is used. stringWillBeTokenized=%ls", stringWillBeTokenized.GetPointer());
518
519         std::unique_ptr< ArrayList, AllElementsDeleter > pTmpArrayList(pArrayList);
520         SysTryReturnResult(NID_LCL, pTmpArrayList, E_INVALID_ARG, "Invalid argument is used. pArrayList should not be null");
521
522         result r = pTmpArrayList->Construct(tokenCount);  // Constructing list for tokenCount elements
523         if (!IsFailed(r))
524         {
525                 String token;
526                 std::unique_ptr< String > pListStr(null);
527                 while (tokenizer.GetNextToken(token) == E_SUCCESS)
528                 {
529                         pListStr.reset(new (std::nothrow) String(token));
530                         SysTryReturnResult(NID_LCL, pListStr, E_OUT_OF_MEMORY, "Memory allocation failed.");
531
532                         r = pTmpArrayList->Add(pListStr.get());
533                         SysTryReturnResult(NID_LCL, r == E_SUCCESS, r, "Failed to add value to array list.");
534
535                         pListStr.release();
536                 }
537         }
538
539         pTmpArrayList.release();
540         return r;
541 }
542
543 void
544 _DateTimeSymbolsImpl::ReleaseList(IList* pList)
545 {
546         if (pList)
547         {
548                 pList->RemoveAll(true);         // Remove elements and de-allocate memory used by them
549                 delete pList;
550         }
551 }
552
553 // This function release all the list after deleting their contents
554 void
555 _DateTimeSymbolsImpl::ReleaseAll(void)
556 {
557         ReleaseList(__pErasList);                           // Deleting EraList after deleting its contents
558         ReleaseList(__pMonthsList);                         // Deleting MonthsList after deleting its contents
559         ReleaseList(__pShortMonthsList);                    // Deleting ShortMonthsList after deleting its contents
560         ReleaseList(__pWeekdaysList);                       // Deleting WeekdaysList after deleting its contents
561         ReleaseList(__pShortWeekdaysList);                  // Deleting ShortWeekdaysList after deleting its contents
562         ReleaseList(__pAmPmList);                           // Deleting AmPmList after deleting its contents
563
564         if (__pTimeZonesMap)
565         {
566                 __pTimeZonesMap->RemoveAll(true);               // Removing and deleting contents of TimeZonesMap
567                 delete __pTimeZonesMap;                         // Deleting TimeZonesMap
568         }
569 }
570
571 _DateTimeSymbolsImpl*
572 _DateTimeSymbolsImpl::GetDateTimeSymbolsImpl(DateTimeSymbols* pDateTimeSymbols)
573 {
574         return pDateTimeSymbols->__pDateTimeSymbolsImpl;
575 }
576
577 };
578 };      // Tizen::Locale
579