1c3ac87e8SOliver Tappe #ifndef _COUNTRY_H_ 2c3ac87e8SOliver Tappe #define _COUNTRY_H_ 3c3ac87e8SOliver Tappe 4c3ac87e8SOliver Tappe 5c3ac87e8SOliver Tappe #include <SupportDefs.h> 6c3ac87e8SOliver Tappe #include <LocaleStrings.h> 7c3ac87e8SOliver Tappe #include <String.h> 8c3ac87e8SOliver Tappe 9c3ac87e8SOliver Tappe enum { 10c3ac87e8SOliver Tappe B_METRIC = 0, 11c3ac87e8SOliver Tappe B_US 12c3ac87e8SOliver Tappe }; 13c3ac87e8SOliver Tappe 14c3ac87e8SOliver Tappe 15*723383c0SOliver Tappe class BCountry { 16c3ac87e8SOliver Tappe public: 17c3ac87e8SOliver Tappe BCountry(); 18c3ac87e8SOliver Tappe virtual ~BCountry(); 19c3ac87e8SOliver Tappe 20c3ac87e8SOliver Tappe virtual const char *Name() const; 21c3ac87e8SOliver Tappe 22c3ac87e8SOliver Tappe // see definitions below 23c3ac87e8SOliver Tappe const char *GetString(uint32 id) const; 24c3ac87e8SOliver Tappe 25c3ac87e8SOliver Tappe // date & time 26c3ac87e8SOliver Tappe 27c3ac87e8SOliver Tappe virtual void FormatDate(char *string,size_t maxSize,time_t time,bool longFormat); 28c3ac87e8SOliver Tappe virtual void FormatDate(BString *string,time_t time,bool longFormat); 29c3ac87e8SOliver Tappe virtual void FormatTime(char *string,size_t maxSize,time_t time,bool longFormat); 30c3ac87e8SOliver Tappe virtual void FormatTime(BString *string,time_t time,bool longFormat); 31c3ac87e8SOliver Tappe 32c3ac87e8SOliver Tappe const char *DateFormat(bool longFormat) const; 33c3ac87e8SOliver Tappe const char *TimeFormat(bool longFormat) const; 34c3ac87e8SOliver Tappe const char *DateSeparator() const; 35c3ac87e8SOliver Tappe const char *TimeSeparator() const; 36c3ac87e8SOliver Tappe 37c3ac87e8SOliver Tappe // numbers 38c3ac87e8SOliver Tappe 39c3ac87e8SOliver Tappe virtual void FormatNumber(char *string,size_t maxSize,double value); 40c3ac87e8SOliver Tappe virtual void FormatNumber(BString *string,double value); 41c3ac87e8SOliver Tappe virtual void FormatNumber(char *string,size_t maxSize,int32 value); 42c3ac87e8SOliver Tappe virtual void FormatNumber(BString *string,int32 value); 43c3ac87e8SOliver Tappe 44c3ac87e8SOliver Tappe const char *DecimalPoint() const; 45c3ac87e8SOliver Tappe const char *ThousandsSeparator() const; 46c3ac87e8SOliver Tappe const char *Grouping() const; 47c3ac87e8SOliver Tappe 48c3ac87e8SOliver Tappe const char *PositiveSign() const; 49c3ac87e8SOliver Tappe const char *NegativeSign() const; 50c3ac87e8SOliver Tappe 51c3ac87e8SOliver Tappe // measurements 52c3ac87e8SOliver Tappe 53c3ac87e8SOliver Tappe virtual int8 Measurement() const; 54c3ac87e8SOliver Tappe 55c3ac87e8SOliver Tappe // monetary 56c3ac87e8SOliver Tappe 57c3ac87e8SOliver Tappe virtual ssize_t FormatMonetary(char *string,size_t maxSize,char *format, ...); 58c3ac87e8SOliver Tappe virtual ssize_t FormatMonetary(BString *string,char *format, ...); 59c3ac87e8SOliver Tappe 60c3ac87e8SOliver Tappe const char *CurrencySymbol() const; 61c3ac87e8SOliver Tappe const char *InternationalCurrencySymbol() const; 62c3ac87e8SOliver Tappe const char *MonDecimalPoint() const; 63c3ac87e8SOliver Tappe const char *MonThousandsSeparator() const; 64c3ac87e8SOliver Tappe const char *MonGrouping() const; 65c3ac87e8SOliver Tappe virtual int32 MonFracDigits() const; 66c3ac87e8SOliver Tappe 67c3ac87e8SOliver Tappe protected: 68c3ac87e8SOliver Tappe BCountry(const char **strings); 69c3ac87e8SOliver Tappe 70c3ac87e8SOliver Tappe private: 71c3ac87e8SOliver Tappe const char **fStrings; 72c3ac87e8SOliver Tappe }; 73c3ac87e8SOliver Tappe 74c3ac87e8SOliver Tappe #endif /* _COUNTRY_H_ */ 75