ICU 51.2
51.2
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
i18n
unicode
tznames.h
Go to the documentation of this file.
1
/*
2
*******************************************************************************
3
* Copyright (C) 2011-2013, International Business Machines Corporation and *
4
* others. All Rights Reserved. *
5
*******************************************************************************
6
*/
7
#ifndef __TZNAMES_H
8
#define __TZNAMES_H
9
14
#include "
unicode/utypes.h
"
15
16
#if !UCONFIG_NO_FORMATTING
17
#ifndef U_HIDE_DRAFT_API
18
19
#include "
unicode/uloc.h
"
20
#include "
unicode/unistr.h
"
21
22
U_CDECL_BEGIN
23
28
typedef
enum
UTimeZoneNameType
{
33
UTZNM_UNKNOWN
= 0x00,
38
UTZNM_LONG_GENERIC
= 0x01,
43
UTZNM_LONG_STANDARD
= 0x02,
48
UTZNM_LONG_DAYLIGHT
= 0x04,
53
UTZNM_SHORT_GENERIC
= 0x08,
58
UTZNM_SHORT_STANDARD
= 0x10,
63
UTZNM_SHORT_DAYLIGHT
= 0x20,
64
#ifndef U_HIDE_DRAFT_API
65
69
UTZNM_EXEMPLAR_LOCATION
= 0x40
70
#endif
/* U_HIDE_DRAFT_API */
71
}
UTimeZoneNameType
;
72
73
U_CDECL_END
74
75
U_NAMESPACE_BEGIN
76
77
class
UVector;
78
struct
MatchInfo;
79
130
class
U_I18N_API
TimeZoneNames
:
public
UObject
{
131
public
:
136
virtual
~
TimeZoneNames
();
137
144
virtual
UBool
operator==
(
const
TimeZoneNames
& other)
const
= 0;
145
153
UBool
operator!=
(
const
TimeZoneNames
& other)
const
{
return
!
operator==
(other); }
154
161
virtual
TimeZoneNames
* clone()
const
= 0;
162
171
static
TimeZoneNames
* U_EXPORT2 createInstance(
const
Locale
& locale,
UErrorCode
& status);
172
179
virtual
StringEnumeration
* getAvailableMetaZoneIDs(
UErrorCode
& status)
const
= 0;
180
188
virtual
StringEnumeration
* getAvailableMetaZoneIDs(
const
UnicodeString
& tzID,
UErrorCode
& status)
const
= 0;
189
200
virtual
UnicodeString
& getMetaZoneID(
const
UnicodeString
& tzID,
UDate
date,
UnicodeString
& mzID)
const
= 0;
201
218
virtual
UnicodeString
& getReferenceZoneID(
const
UnicodeString
& mzID,
const
char
* region,
UnicodeString
& tzID)
const
= 0;
219
230
virtual
UnicodeString
& getMetaZoneDisplayName(
const
UnicodeString
& mzID,
UTimeZoneNameType
type,
UnicodeString
& name)
const
= 0;
231
242
virtual
UnicodeString
& getTimeZoneDisplayName(
const
UnicodeString
& tzID,
UTimeZoneNameType
type,
UnicodeString
& name)
const
= 0;
243
263
virtual
UnicodeString
& getExemplarLocationName(
const
UnicodeString
& tzID,
UnicodeString
& name)
const
;
264
280
virtual
UnicodeString
& getDisplayName(
const
UnicodeString
& tzID,
UTimeZoneNameType
type,
UDate
date,
UnicodeString
& name)
const
;
281
287
class
U_I18N_API
MatchInfoCollection
:
public
UMemory
{
288
public
:
293
MatchInfoCollection
();
298
virtual
~
MatchInfoCollection
();
299
300
#ifndef U_HIDE_INTERNAL_API
301
309
void
addZone(
UTimeZoneNameType
nameType, int32_t matchLength,
310
const
UnicodeString
& tzID,
UErrorCode
& status);
311
320
void
addMetaZone(
UTimeZoneNameType
nameType, int32_t matchLength,
321
const
UnicodeString
& mzID,
UErrorCode
& status);
322
328
int32_t size()
const
;
329
338
UTimeZoneNameType
getNameTypeAt(int32_t idx)
const
;
339
347
int32_t getMatchLengthAt(int32_t idx)
const
;
348
356
UBool
getTimeZoneIDAt(int32_t idx,
UnicodeString
& tzID)
const
;
357
365
UBool
getMetaZoneIDAt(int32_t idx,
UnicodeString
& mzID)
const
;
366
#endif
/* U_HIDE_INTERNAL_API */
367
368
private
:
369
UVector* fMatches;
// vector of MatchEntry
370
371
UVector* matches(
UErrorCode
& status);
372
};
373
387
virtual
MatchInfoCollection
* find(
const
UnicodeString
& text, int32_t start, uint32_t types,
UErrorCode
& status)
const
= 0;
388
};
389
390
U_NAMESPACE_END
391
392
#endif
/* U_HIDE_DRAFT_API */
393
#endif
394
#endif
Generated on Thu May 23 2013 00:42:33 for ICU 51.2 by
1.8.1.2