ICU 50.1.2
50.1.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-2012, 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_INTERNAL_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
}
UTimeZoneNameType
;
65
66
U_CDECL_END
67
68
U_NAMESPACE_BEGIN
69
70
class
UVector;
71
struct
MatchInfo;
72
116
class
U_I18N_API
TimeZoneNames
:
public
UObject
{
117
public
:
122
virtual
~
TimeZoneNames
();
123
130
virtual
UBool
operator==
(
const
TimeZoneNames
& other)
const
= 0;
131
139
UBool
operator!=
(
const
TimeZoneNames
& other)
const
{
return
!
operator==
(other); }
140
147
virtual
TimeZoneNames
* clone()
const
= 0;
148
157
static
TimeZoneNames
* U_EXPORT2 createInstance(
const
Locale
& locale,
UErrorCode
& status);
158
165
virtual
StringEnumeration
* getAvailableMetaZoneIDs(
UErrorCode
& status)
const
= 0;
166
174
virtual
StringEnumeration
* getAvailableMetaZoneIDs(
const
UnicodeString
& tzID,
UErrorCode
& status)
const
= 0;
175
186
virtual
UnicodeString
& getMetaZoneID(
const
UnicodeString
& tzID,
UDate
date,
UnicodeString
& mzID)
const
= 0;
187
198
virtual
UnicodeString
& getReferenceZoneID(
const
UnicodeString
& mzID,
const
char
* region,
UnicodeString
& tzID)
const
= 0;
199
210
virtual
UnicodeString
& getMetaZoneDisplayName(
const
UnicodeString
& mzID,
UTimeZoneNameType
type,
UnicodeString
& name)
const
= 0;
211
222
virtual
UnicodeString
& getTimeZoneDisplayName(
const
UnicodeString
& tzID,
UTimeZoneNameType
type,
UnicodeString
& name)
const
= 0;
223
243
virtual
UnicodeString
& getExemplarLocationName(
const
UnicodeString
& tzID,
UnicodeString
& name)
const
;
244
260
virtual
UnicodeString
& getDisplayName(
const
UnicodeString
& tzID,
UTimeZoneNameType
type,
UDate
date,
UnicodeString
& name)
const
;
261
267
class
U_I18N_API
MatchInfoCollection
:
public
UMemory
{
268
public
:
273
MatchInfoCollection
();
278
virtual
~
MatchInfoCollection
();
279
288
void
addZone(
UTimeZoneNameType
nameType, int32_t matchLength,
289
const
UnicodeString
& tzID,
UErrorCode
& status);
290
299
void
addMetaZone(
UTimeZoneNameType
nameType, int32_t matchLength,
300
const
UnicodeString
& mzID,
UErrorCode
& status);
301
307
int32_t size()
const
;
308
317
UTimeZoneNameType
getNameTypeAt(int32_t idx)
const
;
318
326
int32_t getMatchLengthAt(int32_t idx)
const
;
327
335
UBool
getTimeZoneIDAt(int32_t idx,
UnicodeString
& tzID)
const
;
336
344
UBool
getMetaZoneIDAt(int32_t idx,
UnicodeString
& mzID)
const
;
345
346
private
:
347
UVector* fMatches;
// vector of MatchEntry
348
349
UVector* matches(
UErrorCode
& status);
350
};
351
365
virtual
MatchInfoCollection
* find(
const
UnicodeString
& text, int32_t start, uint32_t types,
UErrorCode
& status)
const
= 0;
366
367
private
:
368
// No ICU "poor man's RTTI" for this class nor its subclasses.
369
virtual
UClassID
getDynamicClassID()
const
;
370
};
371
372
U_NAMESPACE_END
373
374
#endif
/* U_HIDE_INTERNAL_API */
375
#endif
376
#endif
Generated by
1.8.3.1