ICU 52.1
52.1
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
18
#include "
unicode/uloc.h
"
19
#include "
unicode/unistr.h
"
20
21
U_CDECL_BEGIN
22
27
typedef
enum
UTimeZoneNameType
{
32
UTZNM_UNKNOWN
= 0x00,
37
UTZNM_LONG_GENERIC
= 0x01,
42
UTZNM_LONG_STANDARD
= 0x02,
47
UTZNM_LONG_DAYLIGHT
= 0x04,
52
UTZNM_SHORT_GENERIC
= 0x08,
57
UTZNM_SHORT_STANDARD
= 0x10,
62
UTZNM_SHORT_DAYLIGHT
= 0x20,
63
#ifndef U_HIDE_DRAFT_API
64
68
UTZNM_EXEMPLAR_LOCATION
= 0x40
69
#endif
/* U_HIDE_DRAFT_API */
70
}
UTimeZoneNameType
;
71
72
U_CDECL_END
73
74
U_NAMESPACE_BEGIN
75
76
class
UVector;
77
struct
MatchInfo;
78
129
class
U_I18N_API
TimeZoneNames
:
public
UObject
{
130
public
:
135
virtual
~
TimeZoneNames
();
136
143
virtual
UBool
operator==
(
const
TimeZoneNames
& other)
const
= 0;
144
152
UBool
operator!=
(
const
TimeZoneNames
& other)
const
{
return
!
operator==
(other); }
153
160
virtual
TimeZoneNames
* clone()
const
= 0;
161
170
static
TimeZoneNames
* U_EXPORT2 createInstance(
const
Locale
& locale,
UErrorCode
& status);
171
178
virtual
StringEnumeration
* getAvailableMetaZoneIDs(
UErrorCode
& status)
const
= 0;
179
187
virtual
StringEnumeration
* getAvailableMetaZoneIDs(
const
UnicodeString
& tzID,
UErrorCode
& status)
const
= 0;
188
199
virtual
UnicodeString
& getMetaZoneID(
const
UnicodeString
& tzID,
UDate
date,
UnicodeString
& mzID)
const
= 0;
200
217
virtual
UnicodeString
& getReferenceZoneID(
const
UnicodeString
& mzID,
const
char
* region,
UnicodeString
& tzID)
const
= 0;
218
229
virtual
UnicodeString
& getMetaZoneDisplayName(
const
UnicodeString
& mzID,
UTimeZoneNameType
type,
UnicodeString
& name)
const
= 0;
230
241
virtual
UnicodeString
& getTimeZoneDisplayName(
const
UnicodeString
& tzID,
UTimeZoneNameType
type,
UnicodeString
& name)
const
= 0;
242
262
virtual
UnicodeString
& getExemplarLocationName(
const
UnicodeString
& tzID,
UnicodeString
& name)
const
;
263
279
virtual
UnicodeString
& getDisplayName(
const
UnicodeString
& tzID,
UTimeZoneNameType
type,
UDate
date,
UnicodeString
& name)
const
;
280
286
class
U_I18N_API
MatchInfoCollection
:
public
UMemory
{
287
public
:
292
MatchInfoCollection
();
297
virtual
~
MatchInfoCollection
();
298
299
#ifndef U_HIDE_INTERNAL_API
300
308
void
addZone(
UTimeZoneNameType
nameType, int32_t matchLength,
309
const
UnicodeString
& tzID,
UErrorCode
& status);
310
319
void
addMetaZone(
UTimeZoneNameType
nameType, int32_t matchLength,
320
const
UnicodeString
& mzID,
UErrorCode
& status);
321
327
int32_t size()
const
;
328
337
UTimeZoneNameType
getNameTypeAt(int32_t idx)
const
;
338
346
int32_t getMatchLengthAt(int32_t idx)
const
;
347
355
UBool
getTimeZoneIDAt(int32_t idx,
UnicodeString
& tzID)
const
;
356
364
UBool
getMetaZoneIDAt(int32_t idx,
UnicodeString
& mzID)
const
;
365
#endif
/* U_HIDE_INTERNAL_API */
366
367
private
:
368
UVector* fMatches;
// vector of MatchEntry
369
370
UVector* matches(
UErrorCode
& status);
371
};
372
386
virtual
MatchInfoCollection
* find(
const
UnicodeString
& text, int32_t start, uint32_t types,
UErrorCode
& status)
const
= 0;
387
};
388
389
U_NAMESPACE_END
390
391
#endif
392
#endif
Generated on Fri Oct 4 2013 14:10:21 for ICU 52.1 by
1.8.1.2