00001
00002
00003
00004 #ifndef __UFORMATTEDVALUE_H__
00005 #define __UFORMATTEDVALUE_H__
00006
00007 #include "unicode/utypes.h"
00008
00009 #if !UCONFIG_NO_FORMATTING
00010
00011 #include "unicode/ufieldpositer.h"
00012
00034 typedef enum UFieldCategory {
00040 UFIELD_CATEGORY_UNDEFINED = 0,
00041
00047 UFIELD_CATEGORY_DATE,
00048
00054 UFIELD_CATEGORY_NUMBER,
00055
00061 UFIELD_CATEGORY_LIST,
00062
00068 UFIELD_CATEGORY_RELATIVE_DATETIME,
00069
00075 UFIELD_CATEGORY_DATE_INTERVAL,
00076
00077 #ifndef U_HIDE_INTERNAL_API
00078
00079 UFIELD_CATEGORY_COUNT,
00080 #endif
00081
00087 UFIELD_CATEGORY_LIST_SPAN = 0x1000 + UFIELD_CATEGORY_LIST,
00088
00094 UFIELD_CATEGORY_DATE_INTERVAL_SPAN = 0x1000 + UFIELD_CATEGORY_DATE_INTERVAL,
00095
00096 } UFieldCategory;
00097
00098
00099 struct UConstrainedFieldPosition;
00111 typedef struct UConstrainedFieldPosition UConstrainedFieldPosition;
00112
00113
00123 U_STABLE UConstrainedFieldPosition* U_EXPORT2
00124 ucfpos_open(UErrorCode* ec);
00125
00126
00136 U_STABLE void U_EXPORT2
00137 ucfpos_reset(
00138 UConstrainedFieldPosition* ucfpos,
00139 UErrorCode* ec);
00140
00141
00148 U_STABLE void U_EXPORT2
00149 ucfpos_close(UConstrainedFieldPosition* ucfpos);
00150
00151
00177 U_STABLE void U_EXPORT2
00178 ucfpos_constrainCategory(
00179 UConstrainedFieldPosition* ucfpos,
00180 int32_t category,
00181 UErrorCode* ec);
00182
00183
00210 U_STABLE void U_EXPORT2
00211 ucfpos_constrainField(
00212 UConstrainedFieldPosition* ucfpos,
00213 int32_t category,
00214 int32_t field,
00215 UErrorCode* ec);
00216
00217
00230 U_STABLE int32_t U_EXPORT2
00231 ucfpos_getCategory(
00232 const UConstrainedFieldPosition* ucfpos,
00233 UErrorCode* ec);
00234
00235
00248 U_STABLE int32_t U_EXPORT2
00249 ucfpos_getField(
00250 const UConstrainedFieldPosition* ucfpos,
00251 UErrorCode* ec);
00252
00253
00265 U_STABLE void U_EXPORT2
00266 ucfpos_getIndexes(
00267 const UConstrainedFieldPosition* ucfpos,
00268 int32_t* pStart,
00269 int32_t* pLimit,
00270 UErrorCode* ec);
00271
00272
00285 U_STABLE int64_t U_EXPORT2
00286 ucfpos_getInt64IterationContext(
00287 const UConstrainedFieldPosition* ucfpos,
00288 UErrorCode* ec);
00289
00290
00301 U_STABLE void U_EXPORT2
00302 ucfpos_setInt64IterationContext(
00303 UConstrainedFieldPosition* ucfpos,
00304 int64_t context,
00305 UErrorCode* ec);
00306
00307
00320 U_STABLE UBool U_EXPORT2
00321 ucfpos_matchesField(
00322 const UConstrainedFieldPosition* ucfpos,
00323 int32_t category,
00324 int32_t field,
00325 UErrorCode* ec);
00326
00327
00344 U_STABLE void U_EXPORT2
00345 ucfpos_setState(
00346 UConstrainedFieldPosition* ucfpos,
00347 int32_t category,
00348 int32_t field,
00349 int32_t start,
00350 int32_t limit,
00351 UErrorCode* ec);
00352
00353
00354 struct UFormattedValue;
00361 typedef struct UFormattedValue UFormattedValue;
00362
00363
00377 U_STABLE const UChar* U_EXPORT2
00378 ufmtval_getString(
00379 const UFormattedValue* ufmtval,
00380 int32_t* pLength,
00381 UErrorCode* ec);
00382
00383
00407 U_STABLE UBool U_EXPORT2
00408 ufmtval_nextPosition(
00409 const UFormattedValue* ufmtval,
00410 UConstrainedFieldPosition* ucfpos,
00411 UErrorCode* ec);
00412
00413
00414 #if U_SHOW_CPLUSPLUS_API
00415 U_NAMESPACE_BEGIN
00416
00429 U_DEFINE_LOCAL_OPEN_POINTER(LocalUConstrainedFieldPositionPointer,
00430 UConstrainedFieldPosition,
00431 ucfpos_close);
00432
00433 U_NAMESPACE_END
00434 #endif // U_SHOW_CPLUSPLUS_API
00435
00436
00437 #endif
00438 #endif // __UFORMATTEDVALUE_H__