1 /* 2 * Copyright 2003-2010, Haiku, Inc. 3 * Distributed under the terms of the MIT Licence. 4 */ 5 #ifndef _B_FORMAT_H_ 6 #define _B_FORMAT_H_ 7 8 #include <FormatParameters.h> 9 #include <SupportDefs.h> 10 11 12 // types of fields contained in formatted strings 13 enum { 14 // number format fields 15 B_CURRENCY_FIELD, 16 B_DECIMAL_SEPARATOR_FIELD, 17 B_EXPONENT_FIELD, 18 B_EXPONENT_SIGN_FIELD, 19 B_EXPONENT_SYMBOL_FIELD, 20 B_FRACTION_FIELD, 21 B_GROUPING_SEPARATOR_FIELD, 22 B_INTEGER_FIELD, 23 B_PERCENT_FIELD, 24 B_PERMILLE_FIELD, 25 B_SIGN_FIELD, 26 27 // date format fields 28 // TODO: ... 29 }; 30 31 // structure filled in while formatting 32 struct format_field_position { 33 uint32 field_type; 34 int32 start; 35 int32 length; 36 }; 37 38 39 class BFormatImpl; 40 41 class BFormat { 42 protected: 43 BFormat(const BFormat& other); 44 virtual ~BFormat(); 45 46 BFormat& operator=(const BFormat& other); 47 48 BFormat(); 49 }; 50 51 52 #endif // _B_FORMAT_H_ 53