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
00013 #ifndef U_HIDE_DRAFT_API
00014
00036 typedef enum UFieldCategory {
00042 UFIELD_CATEGORY_UNDEFINED = 0,
00043
00049 UFIELD_CATEGORY_DATE,
00050
00056 UFIELD_CATEGORY_NUMBER,
00057
00063 UFIELD_CATEGORY_LIST,
00064
00070 UFIELD_CATEGORY_RELATIVE_DATETIME,
00071
00077 UFIELD_CATEGORY_DATE_INTERVAL,
00078
00079 #ifndef U_HIDE_INTERNAL_API
00080
00081 UFIELD_CATEGORY_COUNT,
00082 #endif
00083
00089 UFIELD_CATEGORY_LIST_SPAN = 0x1000 + UFIELD_CATEGORY_LIST,
00090
00096 UFIELD_CATEGORY_DATE_INTERVAL_SPAN = 0x1000 + UFIELD_CATEGORY_DATE_INTERVAL,
00097
00098 } UFieldCategory;
00099
00100
00101 struct UConstrainedFieldPosition;
00113 typedef struct UConstrainedFieldPosition UConstrainedFieldPosition;
00114
00115
00125 U_DRAFT UConstrainedFieldPosition* U_EXPORT2
00126 ucfpos_open(UErrorCode* ec);
00127
00128
00138 U_DRAFT void U_EXPORT2
00139 ucfpos_reset(
00140 UConstrainedFieldPosition* ucfpos,
00141 UErrorCode* ec);
00142
00143
00150 U_DRAFT void U_EXPORT2
00151 ucfpos_close(UConstrainedFieldPosition* ucfpos);
00152
00153
00179 U_DRAFT void U_EXPORT2
00180 ucfpos_constrainCategory(
00181 UConstrainedFieldPosition* ucfpos,
00182 int32_t category,
00183 UErrorCode* ec);
00184
00185
00212 U_DRAFT void U_EXPORT2
00213 ucfpos_constrainField(
00214 UConstrainedFieldPosition* ucfpos,
00215 int32_t category,
00216 int32_t field,
00217 UErrorCode* ec);
00218
00219
00232 U_DRAFT int32_t U_EXPORT2
00233 ucfpos_getCategory(
00234 const UConstrainedFieldPosition* ucfpos,
00235 UErrorCode* ec);
00236
00237
00250 U_DRAFT int32_t U_EXPORT2
00251 ucfpos_getField(
00252 const UConstrainedFieldPosition* ucfpos,
00253 UErrorCode* ec);
00254
00255
00267 U_DRAFT void U_EXPORT2
00268 ucfpos_getIndexes(
00269 const UConstrainedFieldPosition* ucfpos,
00270 int32_t* pStart,
00271 int32_t* pLimit,
00272 UErrorCode* ec);
00273
00274
00287 U_DRAFT int64_t U_EXPORT2
00288 ucfpos_getInt64IterationContext(
00289 const UConstrainedFieldPosition* ucfpos,
00290 UErrorCode* ec);
00291
00292
00303 U_DRAFT void U_EXPORT2
00304 ucfpos_setInt64IterationContext(
00305 UConstrainedFieldPosition* ucfpos,
00306 int64_t context,
00307 UErrorCode* ec);
00308
00309
00322 U_DRAFT UBool U_EXPORT2
00323 ucfpos_matchesField(
00324 const UConstrainedFieldPosition* ucfpos,
00325 int32_t category,
00326 int32_t field,
00327 UErrorCode* ec);
00328
00329
00346 U_DRAFT void U_EXPORT2
00347 ucfpos_setState(
00348 UConstrainedFieldPosition* ucfpos,
00349 int32_t category,
00350 int32_t field,
00351 int32_t start,
00352 int32_t limit,
00353 UErrorCode* ec);
00354
00355
00356 struct UFormattedValue;
00363 typedef struct UFormattedValue UFormattedValue;
00364
00365
00379 U_DRAFT const UChar* U_EXPORT2
00380 ufmtval_getString(
00381 const UFormattedValue* ufmtval,
00382 int32_t* pLength,
00383 UErrorCode* ec);
00384
00385
00409 U_DRAFT UBool U_EXPORT2
00410 ufmtval_nextPosition(
00411 const UFormattedValue* ufmtval,
00412 UConstrainedFieldPosition* ucfpos,
00413 UErrorCode* ec);
00414
00415
00416 #if U_SHOW_CPLUSPLUS_API
00417 U_NAMESPACE_BEGIN
00418
00431 U_DEFINE_LOCAL_OPEN_POINTER(LocalUConstrainedFieldPositionPointer,
00432 UConstrainedFieldPosition,
00433 ucfpos_close);
00434
00435 U_NAMESPACE_END
00436 #endif // U_SHOW_CPLUSPLUS_API
00437
00438
00439 #endif
00440 #endif
00441 #endif // __UFORMATTEDVALUE_H__