haiku/headers/os/locale/Format.h
Adrien Destugues 33eead339b * Improve the test for TimeFormat (style and error checking)
* Fix the TimeFormat API, there was a double free. Make it work as expected : you send it a number of seconds and it will format it properly in days, hours, minutes, seconds with proper plural.
 * Cleanup other parts of the Format API from useless things. They may get reintroduced later if we feel the need to do so.
 * AboutSystem now use TimeFormat to display the uptime in properly localized way.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-02-17 15:35:28 +00:00

46 lines
762 B
C++

#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
struct format_field_position {
uint32 field_type;
int32 start;
int32 length;
};
class BFormatImpl;
class BFormat {
protected:
BFormat(const BFormat &other);
~BFormat();
BFormat &operator=(const BFormat &other);
BFormat();
};
#endif // _B_FORMAT_H_