00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00028 #ifndef UFORMATTABLE_H
00029 #define UFORMATTABLE_H
00030
00031 #include "unicode/utypes.h"
00032
00033 #if !UCONFIG_NO_FORMATTING
00034
00035 #include "unicode/localpointer.h"
00036
00044 typedef enum UFormattableType {
00045 UFMT_DATE = 0,
00046 UFMT_DOUBLE,
00047 UFMT_LONG,
00048 UFMT_STRING,
00049 UFMT_ARRAY,
00050 UFMT_INT64,
00051 UFMT_OBJECT,
00052 UFMT_COUNT
00053 } UFormattableType;
00054
00055
00062 typedef void *UFormattable;
00063
00074 U_STABLE UFormattable* U_EXPORT2
00075 ufmt_open(UErrorCode* status);
00076
00083 U_STABLE void U_EXPORT2
00084 ufmt_close(UFormattable* fmt);
00085
00086 #if U_SHOW_CPLUSPLUS_API
00087
00088 U_NAMESPACE_BEGIN
00089
00099 U_DEFINE_LOCAL_OPEN_POINTER(LocalUFormattablePointer, UFormattable, ufmt_close);
00100
00101 U_NAMESPACE_END
00102
00103 #endif
00104
00115 U_STABLE UFormattableType U_EXPORT2
00116 ufmt_getType(const UFormattable* fmt, UErrorCode *status);
00117
00126 U_STABLE UBool U_EXPORT2
00127 ufmt_isNumeric(const UFormattable* fmt);
00128
00139 U_STABLE UDate U_EXPORT2
00140 ufmt_getDate(const UFormattable* fmt, UErrorCode *status);
00141
00157 U_STABLE double U_EXPORT2
00158 ufmt_getDouble(UFormattable* fmt, UErrorCode *status);
00159
00178 U_STABLE int32_t U_EXPORT2
00179 ufmt_getLong(UFormattable* fmt, UErrorCode *status);
00180
00181
00199 U_STABLE int64_t U_EXPORT2
00200 ufmt_getInt64(UFormattable* fmt, UErrorCode *status);
00201
00212 U_STABLE const void *U_EXPORT2
00213 ufmt_getObject(const UFormattable* fmt, UErrorCode *status);
00214
00227 U_STABLE const UChar* U_EXPORT2
00228 ufmt_getUChars(UFormattable* fmt, int32_t *len, UErrorCode *status);
00229
00238 U_STABLE int32_t U_EXPORT2
00239 ufmt_getArrayLength(const UFormattable* fmt, UErrorCode *status);
00240
00250 U_STABLE UFormattable * U_EXPORT2
00251 ufmt_getArrayItemByIndex(UFormattable* fmt, int32_t n, UErrorCode *status);
00252
00275 U_STABLE const char * U_EXPORT2
00276 ufmt_getDecNumChars(UFormattable *fmt, int32_t *len, UErrorCode *status);
00277
00278 #endif
00279
00280 #endif