00001
00002
00003
00004 #ifndef __UFORMATTEDVALUE_H__
00005 #define __UFORMATTEDVALUE_H__
00006
00007 #include "unicode/utypes.h"
00008
00009 #if !UCONFIG_NO_FORMATTING
00010 #ifndef U_HIDE_DRAFT_API
00011
00012 #include "unicode/ufieldpositer.h"
00013
00035 typedef enum UFieldCategory {
00041 UFIELD_CATEGORY_UNDEFINED = 0,
00042
00048 UFIELD_CATEGORY_DATE,
00049
00055 UFIELD_CATEGORY_NUMBER,
00056
00062 UFIELD_CATEGORY_LIST,
00063
00069 UFIELD_CATEGORY_RELATIVE_DATETIME,
00070
00076 UFIELD_CATEGORY_DATE_INTERVAL,
00077
00078 #ifndef U_HIDE_INTERNAL_API
00079
00080 UFIELD_CATEGORY_COUNT,
00081 #endif
00082
00088 UFIELD_CATEGORY_LIST_SPAN = 0x1000 + UFIELD_CATEGORY_LIST,
00089
00095 UFIELD_CATEGORY_DATE_INTERVAL_SPAN = 0x1000 + UFIELD_CATEGORY_DATE_INTERVAL,
00096
00097 } UFieldCategory;
00098
00099
00100 struct UConstrainedFieldPosition;
00112 typedef struct UConstrainedFieldPosition UConstrainedFieldPosition;
00113
00114
00124 U_DRAFT UConstrainedFieldPosition* U_EXPORT2
00125 ucfpos_open(UErrorCode* ec);
00126
00127
00137 U_DRAFT void U_EXPORT2
00138 ucfpos_reset(
00139 UConstrainedFieldPosition* ucfpos,
00140 UErrorCode* ec);
00141
00142
00149 U_DRAFT void U_EXPORT2
00150 ucfpos_close(UConstrainedFieldPosition* ucfpos);
00151
00152
00178 U_DRAFT void U_EXPORT2
00179 ucfpos_constrainCategory(
00180 UConstrainedFieldPosition* ucfpos,
00181 int32_t category,
00182 UErrorCode* ec);
00183
00184
00211 U_DRAFT void U_EXPORT2
00212 ucfpos_constrainField(
00213 UConstrainedFieldPosition* ucfpos,
00214 int32_t category,
00215 int32_t field,
00216 UErrorCode* ec);
00217
00218
00231 U_DRAFT int32_t U_EXPORT2
00232 ucfpos_getCategory(
00233 const UConstrainedFieldPosition* ucfpos,
00234 UErrorCode* ec);
00235
00236
00249 U_DRAFT int32_t U_EXPORT2
00250 ucfpos_getField(
00251 const UConstrainedFieldPosition* ucfpos,
00252 UErrorCode* ec);
00253
00254
00266 U_DRAFT void U_EXPORT2
00267 ucfpos_getIndexes(
00268 const UConstrainedFieldPosition* ucfpos,
00269 int32_t* pStart,
00270 int32_t* pLimit,
00271 UErrorCode* ec);
00272
00273
00286 U_DRAFT int64_t U_EXPORT2
00287 ucfpos_getInt64IterationContext(
00288 const UConstrainedFieldPosition* ucfpos,
00289 UErrorCode* ec);
00290
00291
00302 U_DRAFT void U_EXPORT2
00303 ucfpos_setInt64IterationContext(
00304 UConstrainedFieldPosition* ucfpos,
00305 int64_t context,
00306 UErrorCode* ec);
00307
00308
00321 U_DRAFT UBool U_EXPORT2
00322 ucfpos_matchesField(
00323 const UConstrainedFieldPosition* ucfpos,
00324 int32_t category,
00325 int32_t field,
00326 UErrorCode* ec);
00327
00328
00345 U_DRAFT void U_EXPORT2
00346 ucfpos_setState(
00347 UConstrainedFieldPosition* ucfpos,
00348 int32_t category,
00349 int32_t field,
00350 int32_t start,
00351 int32_t limit,
00352 UErrorCode* ec);
00353
00354
00355 struct UFormattedValue;
00362 typedef struct UFormattedValue UFormattedValue;
00363
00364
00378 U_DRAFT const UChar* U_EXPORT2
00379 ufmtval_getString(
00380 const UFormattedValue* ufmtval,
00381 int32_t* pLength,
00382 UErrorCode* ec);
00383
00384
00408 U_DRAFT UBool U_EXPORT2
00409 ufmtval_nextPosition(
00410 const UFormattedValue* ufmtval,
00411 UConstrainedFieldPosition* ucfpos,
00412 UErrorCode* ec);
00413
00414
00415 #if U_SHOW_CPLUSPLUS_API
00416 U_NAMESPACE_BEGIN
00417
00430 U_DEFINE_LOCAL_OPEN_POINTER(LocalUConstrainedFieldPositionPointer,
00431 UConstrainedFieldPosition,
00432 ucfpos_close);
00433
00434 U_NAMESPACE_END
00435 #endif // U_SHOW_CPLUSPLUS_API
00436
00437
00438 #endif
00439 #endif
00440 #endif // __UFORMATTEDVALUE_H__