ICU 4.8.1.1
4.8.1.1
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
i18n
unicode
format.h
Go to the documentation of this file.
1
/*
2
********************************************************************************
3
* Copyright (C) 1997-2010, International Business Machines Corporation and others.
4
* All Rights Reserved.
5
********************************************************************************
6
*
7
* File FORMAT.H
8
*
9
* Modification History:
10
*
11
* Date Name Description
12
* 02/19/97 aliu Converted from java.
13
* 03/17/97 clhuang Updated per C++ implementation.
14
* 03/27/97 helena Updated to pass the simple test after code review.
15
********************************************************************************
16
*/
17
// *****************************************************************************
18
// This file was generated from the java source file Format.java
19
// *****************************************************************************
20
21
#ifndef FORMAT_H
22
#define FORMAT_H
23
24
25
#include "
unicode/utypes.h
"
26
32
#if !UCONFIG_NO_FORMATTING
33
34
#include "
unicode/unistr.h
"
35
#include "
unicode/fmtable.h
"
36
#include "
unicode/fieldpos.h
"
37
#include "
unicode/fpositer.h
"
38
#include "
unicode/parsepos.h
"
39
#include "
unicode/parseerr.h
"
40
#include "
unicode/locid.h
"
41
42
U_NAMESPACE_BEGIN
43
94
class
U_I18N_API
Format
:
public
UObject
{
95
public
:
96
100
virtual
~
Format
();
101
110
virtual
UBool
operator==
(
const
Format
& other)
const
= 0;
111
119
UBool
operator!=
(
const
Format
& other)
const
{
return
!
operator==
(other); }
120
127
virtual
Format
* clone()
const
= 0;
128
139
UnicodeString
& format(
const
Formattable
& obj,
140
UnicodeString
& appendTo,
141
UErrorCode
& status)
const
;
142
159
virtual
UnicodeString
& format(
const
Formattable
& obj,
160
UnicodeString
& appendTo,
161
FieldPosition
& pos,
162
UErrorCode
& status)
const
= 0;
179
virtual
UnicodeString
& format(
const
Formattable
& obj,
180
UnicodeString
& appendTo,
181
FieldPositionIterator
* posIter,
182
UErrorCode
& status)
const
;
183
223
virtual
void
parseObject(
const
UnicodeString
& source,
224
Formattable
& result,
225
ParsePosition
& parse_pos)
const
= 0;
226
239
void
parseObject(
const
UnicodeString
& source,
240
Formattable
& result,
241
UErrorCode
& status)
const
;
242
249
Locale
getLocale(
ULocDataLocaleType
type,
UErrorCode
& status)
const
;
250
257
const
char
* getLocaleID(
ULocDataLocaleType
type,
UErrorCode
&status)
const
;
258
259
protected
:
261
void
setLocaleIDs(
const
char
* valid,
const
char
* actual);
262
263
protected
:
268
Format
();
269
273
Format
(
const
Format
&);
// Does nothing; for subclasses only
274
278
Format
& operator=(
const
Format
&);
// Does nothing; for subclasses
279
280
289
static
void
syntaxError(
const
UnicodeString
& pattern,
290
int32_t pos,
291
UParseError
& parseError);
292
293
private
:
294
char
actualLocale[
ULOC_FULLNAME_CAPACITY
];
295
char
validLocale[
ULOC_FULLNAME_CAPACITY
];
296
};
297
298
U_NAMESPACE_END
299
300
#endif
/* #if !UCONFIG_NO_FORMATTING */
301
302
#endif // _FORMAT
303
//eof
Generated on Mon Mar 16 2015 17:10:52 for ICU 4.8.1.1 by
1.8.1.2