00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00030 #ifndef UFORMATTABLE_H
00031 #define UFORMATTABLE_H
00032
00033 #include "unicode/utypes.h"
00034
00035 #if !UCONFIG_NO_FORMATTING
00036
00037 #include "unicode/localpointer.h"
00038
00046 typedef enum UFormattableType {
00047 UFMT_DATE = 0,
00048 UFMT_DOUBLE,
00049 UFMT_LONG,
00050 UFMT_STRING,
00051 UFMT_ARRAY,
00052 UFMT_INT64,
00053 UFMT_OBJECT,
00054 #ifndef U_HIDE_DEPRECATED_API
00055
00059 UFMT_COUNT
00060 #endif
00061 } UFormattableType;
00062
00063
00070 typedef void *UFormattable;
00071
00082 U_STABLE UFormattable* U_EXPORT2
00083 ufmt_open(UErrorCode* status);
00084
00091 U_STABLE void U_EXPORT2
00092 ufmt_close(UFormattable* fmt);
00093
00094 #if U_SHOW_CPLUSPLUS_API
00095
00096 U_NAMESPACE_BEGIN
00097
00107 U_DEFINE_LOCAL_OPEN_POINTER(LocalUFormattablePointer, UFormattable, ufmt_close);
00108
00109 U_NAMESPACE_END
00110
00111 #endif
00112
00123 U_STABLE UFormattableType U_EXPORT2
00124 ufmt_getType(const UFormattable* fmt, UErrorCode *status);
00125
00134 U_STABLE UBool U_EXPORT2
00135 ufmt_isNumeric(const UFormattable* fmt);
00136
00147 U_STABLE UDate U_EXPORT2
00148 ufmt_getDate(const UFormattable* fmt, UErrorCode *status);
00149
00165 U_STABLE double U_EXPORT2
00166 ufmt_getDouble(UFormattable* fmt, UErrorCode *status);
00167
00186 U_STABLE int32_t U_EXPORT2
00187 ufmt_getLong(UFormattable* fmt, UErrorCode *status);
00188
00189
00207 U_STABLE int64_t U_EXPORT2
00208 ufmt_getInt64(UFormattable* fmt, UErrorCode *status);
00209
00220 U_STABLE const void *U_EXPORT2
00221 ufmt_getObject(const UFormattable* fmt, UErrorCode *status);
00222
00235 U_STABLE const UChar* U_EXPORT2
00236 ufmt_getUChars(UFormattable* fmt, int32_t *len, UErrorCode *status);
00237
00246 U_STABLE int32_t U_EXPORT2
00247 ufmt_getArrayLength(const UFormattable* fmt, UErrorCode *status);
00248
00258 U_STABLE UFormattable * U_EXPORT2
00259 ufmt_getArrayItemByIndex(UFormattable* fmt, int32_t n, UErrorCode *status);
00260
00283 U_STABLE const char * U_EXPORT2
00284 ufmt_getDecNumChars(UFormattable *fmt, int32_t *len, UErrorCode *status);
00285
00286 #endif
00287
00288 #endif