ICU 50.1.2  50.1.2
fpositer.h
Go to the documentation of this file.
1 /*
2 ********************************************************************************
3 * Copyright (C) 2010, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 ********************************************************************************
6 *
7 * File attiter.h
8 *
9 * Modification History:
10 *
11 * Date Name Description
12 * 12/15/2009 dougfelt Created
13 ********************************************************************************
14 */
15 
16 #ifndef FPOSITER_H
17 #define FPOSITER_H
18 
19 #include "unicode/utypes.h"
20 #include "unicode/uobject.h"
21 
27 #if UCONFIG_NO_FORMATTING
28 
30 
31 /*
32  * Allow the declaration of APIs with pointers to FieldPositionIterator
33  * even when formatting is removed from the build.
34  */
35 class FieldPositionIterator;
36 
38 
39 #else
40 
41 #include "unicode/fieldpos.h"
42 #include "unicode/umisc.h"
43 
45 
46 class UVector32;
47 
54 public:
60 
66 
73 
83 
90  UBool operator!=(const FieldPositionIterator& rhs) const { return !operator==(rhs); }
91 
97  UBool next(FieldPosition& fp);
98 
99 private:
100  friend class FieldPositionIteratorHandler;
101 
107  void setData(UVector32 *adopt, UErrorCode& status);
108 
109  UVector32 *data;
110  int32_t pos;
111 
112  // No ICU "poor man's RTTI" for this class nor its subclasses.
113  virtual UClassID getDynamicClassID() const;
114 };
115 
117 
118 #endif /* #if !UCONFIG_NO_FORMATTING */
119 
120 #endif // FPOSITER_H
virtual UClassID getDynamicClassID() const =0
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:96
C API:misc definitions.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
Definition: utypes.h:358
C++ API: FieldPosition identifies the fields in a formatted output.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129
FieldPositionIterator returns the field ids and their start/limit positions generated by a call to Fo...
Definition: fpositer.h:53
UBool operator!=(const FieldPositionIterator &rhs) const
Returns the complement of the result of operator==.
Definition: fpositer.h:90
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
FieldPosition is a simple class used by Format and its subclasses to identify fields in formatted out...
Definition: fieldpos.h:106
Basic definitions for ICU, for both C and C++ APIs.
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:229
int8_t UBool
The ICU boolean type.
Definition: umachine.h:200