ICU 60.2 60.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

fpositer.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 ********************************************************************************
5 * Copyright (C) 2010-2012, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 ********************************************************************************
8 *
9 * File attiter.h
10 *
11 * Modification History:
12 *
13 * Date Name Description
14 * 12/15/2009 dougfelt Created
15 ********************************************************************************
16 */
17
18 #ifndef FPOSITER_H
19 #define FPOSITER_H
20
21 #include "unicode/utypes.h"
22 #include "unicode/uobject.h"
23
29 #if UCONFIG_NO_FORMATTING
30
31 U_NAMESPACE_BEGIN
32
33 /*
34 * Allow the declaration of APIs with pointers to FieldPositionIterator
35 * even when formatting is removed from the build.
36 */
37 class FieldPositionIterator;
38
39 U_NAMESPACE_END
40
41 #else
42
43 #include "unicode/fieldpos.h"
44 #include "unicode/umisc.h"
45
46 U_NAMESPACE_BEGIN
47
48 class UVector32;
49
50 // Forward declaration for number formatting:
51 namespace number {
52 namespace impl {
53 class NumberStringBuilder;
54 }
55 }
56
62 class U_I18N_API FieldPositionIterator : public UObject {
63 public:
68 ~FieldPositionIterator();
69
74 FieldPositionIterator(void);
75
81 FieldPositionIterator(const FieldPositionIterator&);
82
91 UBool operator==(const FieldPositionIterator&) const;
92
99 UBool operator!=(const FieldPositionIterator& rhs) const { return !operator==(rhs); }
100
106 UBool next(FieldPosition& fp);
107
108 private:
114 void setData(UVector32 *adopt, UErrorCode& status);
115
116 friend class FieldPositionIteratorHandler;
117 friend class number::impl::NumberStringBuilder;
118
119 UVector32 *data;
120 int32_t pos;
121 };
122
123 U_NAMESPACE_END
124
125 #endif /* #if !UCONFIG_NO_FORMATTING */
126
127 #endif // FPOSITER_H
icu::operator==
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
umisc.h
C API:misc definitions.
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
Definition: utypes.h:360
fieldpos.h
C++ API: FieldPosition identifies the fields in a formatted output.
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
icu::FieldPositionIterator
FieldPositionIterator returns the field ids and their start/limit positions generated by a call to Fo...
Definition: fpositer.h:62
icu::FieldPositionIterator::operator!=
UBool operator!=(const FieldPositionIterator &rhs) const
Returns the complement of the result of operator==.
Definition: fpositer.h:99
uobject.h
C++ API: Common ICU base class UObject.
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:396
icu::FieldPosition
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
Definition: fieldpos.h:108
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:223
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:236