ICU 74.2 74.2

ufieldpositer.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) 2015-2016, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 *****************************************************************************************
8 */
9
10 #ifndef UFIELDPOSITER_H
11 #define UFIELDPOSITER_H
12
13 #include "unicode/utypes.h"
14
15 #if !UCONFIG_NO_FORMATTING
16
17 #if U_SHOW_CPLUSPLUS_API
18 #include "unicode/localpointer.h"
19 #endif // U_SHOW_CPLUSPLUS_API
20
45 struct UFieldPositionIterator;
46 typedef struct UFieldPositionIterator UFieldPositionIterator;
57 U_CAPI UFieldPositionIterator* U_EXPORT2
58 ufieldpositer_open(UErrorCode* status);
59
66 U_CAPI void U_EXPORT2
67 ufieldpositer_close(UFieldPositionIterator *fpositer);
68
69
70 #if U_SHOW_CPLUSPLUS_API
71
72 U_NAMESPACE_BEGIN
73
83 U_DEFINE_LOCAL_OPEN_POINTER(LocalUFieldPositionIteratorPointer, UFieldPositionIterator, ufieldpositer_close);
84
85 U_NAMESPACE_END
86
87 #endif
88
117 U_CAPI int32_t U_EXPORT2
118 ufieldpositer_next(UFieldPositionIterator *fpositer,
119 int32_t *beginIndex, int32_t *endIndex);
120
121 #endif /* #if !UCONFIG_NO_FORMATTING */
122
123 #endif
LocalUFieldPositionIteratorPointer
"Smart pointer" class, closes a UFieldPositionIterator via ufieldpositer_close().
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:550
ufieldpositer_close
U_CAPI void ufieldpositer_close(UFieldPositionIterator *fpositer)
Close a UFieldPositionIterator object.
ufieldpositer_open
U_CAPI UFieldPositionIterator * ufieldpositer_open(UErrorCode *status)
Open a new, unset UFieldPositionIterator object.
ufieldpositer_next
U_CAPI int32_t ufieldpositer_next(UFieldPositionIterator *fpositer, int32_t *beginIndex, int32_t *endIndex)
Get information for the next field in the formatted string to which this UFieldPositionIterator curre...
UFieldPositionIterator
struct UFieldPositionIterator UFieldPositionIterator
C typedef for struct UFieldPositionIterator.
Definition: ufieldpositer.h:46
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:110
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:415