2009-05-01 23:23:59 +04:00
|
|
|
#ifndef _B_FORMAT_H_
|
|
|
|
#define _B_FORMAT_H_
|
|
|
|
|
|
|
|
#include <FormatParameters.h>
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
|
|
// types of fields contained in formatted strings
|
|
|
|
enum {
|
|
|
|
// number format fields
|
|
|
|
B_CURRENCY_FIELD,
|
|
|
|
B_DECIMAL_SEPARATOR_FIELD,
|
|
|
|
B_EXPONENT_FIELD,
|
|
|
|
B_EXPONENT_SIGN_FIELD,
|
|
|
|
B_EXPONENT_SYMBOL_FIELD,
|
|
|
|
B_FRACTION_FIELD,
|
|
|
|
B_GROUPING_SEPARATOR_FIELD,
|
|
|
|
B_INTEGER_FIELD,
|
|
|
|
B_PERCENT_FIELD,
|
|
|
|
B_PERMILLE_FIELD,
|
|
|
|
B_SIGN_FIELD,
|
|
|
|
|
|
|
|
// date format fields
|
|
|
|
// TODO: ...
|
|
|
|
};
|
|
|
|
|
|
|
|
// structure filled in while formatting
|
2009-05-02 01:56:16 +04:00
|
|
|
struct format_field_position {
|
2009-05-01 23:23:59 +04:00
|
|
|
uint32 field_type;
|
|
|
|
int32 start;
|
|
|
|
int32 length;
|
|
|
|
};
|
|
|
|
|
|
|
|
class BFormatImpl;
|
|
|
|
|
2009-05-02 01:56:16 +04:00
|
|
|
class BFormat {
|
2009-05-01 23:23:59 +04:00
|
|
|
protected:
|
|
|
|
BFormat(const BFormat &other);
|
|
|
|
~BFormat();
|
|
|
|
|
|
|
|
BFormat &operator=(const BFormat &other);
|
|
|
|
|
2010-02-17 03:02:50 +03:00
|
|
|
BFormat();
|
2009-05-01 23:23:59 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _B_FORMAT_H_
|