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 #if U_SHOW_CPLUSPLUS_API
00038 #include "unicode/localpointer.h"
00039 #endif // U_SHOW_CPLUSPLUS_API
00040
00048 typedef enum UFormattableType {
00049 UFMT_DATE = 0,
00050 UFMT_DOUBLE,
00051 UFMT_LONG,
00052 UFMT_STRING,
00053 UFMT_ARRAY,
00054 UFMT_INT64,
00055 UFMT_OBJECT,
00056 #ifndef U_HIDE_DEPRECATED_API
00057
00061 UFMT_COUNT
00062 #endif
00063 } UFormattableType;
00064
00065
00072 typedef void *UFormattable;
00073
00084 U_CAPI UFormattable* U_EXPORT2
00085 ufmt_open(UErrorCode* status);
00086
00093 U_CAPI void U_EXPORT2
00094 ufmt_close(UFormattable* fmt);
00095
00096 #if U_SHOW_CPLUSPLUS_API
00097
00098 U_NAMESPACE_BEGIN
00099
00109 U_DEFINE_LOCAL_OPEN_POINTER(LocalUFormattablePointer, UFormattable, ufmt_close);
00110
00111 U_NAMESPACE_END
00112
00113 #endif
00114
00125 U_CAPI UFormattableType U_EXPORT2
00126 ufmt_getType(const UFormattable* fmt, UErrorCode *status);
00127
00136 U_CAPI UBool U_EXPORT2
00137 ufmt_isNumeric(const UFormattable* fmt);
00138
00149 U_CAPI UDate U_EXPORT2
00150 ufmt_getDate(const UFormattable* fmt, UErrorCode *status);
00151
00167 U_CAPI double U_EXPORT2
00168 ufmt_getDouble(UFormattable* fmt, UErrorCode *status);
00169
00188 U_CAPI int32_t U_EXPORT2
00189 ufmt_getLong(UFormattable* fmt, UErrorCode *status);
00190
00191
00209 U_CAPI int64_t U_EXPORT2
00210 ufmt_getInt64(UFormattable* fmt, UErrorCode *status);
00211
00222 U_CAPI const void *U_EXPORT2
00223 ufmt_getObject(const UFormattable* fmt, UErrorCode *status);
00224
00237 U_CAPI const UChar* U_EXPORT2
00238 ufmt_getUChars(UFormattable* fmt, int32_t *len, UErrorCode *status);
00239
00248 U_CAPI int32_t U_EXPORT2
00249 ufmt_getArrayLength(const UFormattable* fmt, UErrorCode *status);
00250
00260 U_CAPI UFormattable * U_EXPORT2
00261 ufmt_getArrayItemByIndex(UFormattable* fmt, int32_t n, UErrorCode *status);
00262
00285 U_CAPI const char * U_EXPORT2
00286 ufmt_getDecNumChars(UFormattable *fmt, int32_t *len, UErrorCode *status);
00287
00288 #endif
00289
00290 #endif