2014-10-07 10:51:23 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2014, Haiku, Inc.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _B_MESSAGE_FORMAT_H_
|
|
|
|
#define _B_MESSAGE_FORMAT_H_
|
|
|
|
|
|
|
|
|
|
|
|
#include <Format.h>
|
|
|
|
|
|
|
|
|
2014-10-08 17:12:48 +04:00
|
|
|
namespace icu {
|
|
|
|
class MessageFormat;
|
|
|
|
class UnicodeString;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-10-07 10:51:23 +04:00
|
|
|
class BMessageFormat: public BFormat {
|
|
|
|
public:
|
2014-10-27 11:05:48 +03:00
|
|
|
BMessageFormat(const BLanguage& language,
|
|
|
|
const BString pattern);
|
2014-10-08 17:12:48 +04:00
|
|
|
BMessageFormat(const BString pattern);
|
|
|
|
~BMessageFormat();
|
|
|
|
|
|
|
|
status_t InitCheck();
|
|
|
|
|
|
|
|
status_t Format(BString& buffer, const int32 arg) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
status_t _Initialize(const icu::UnicodeString&);
|
|
|
|
|
|
|
|
private:
|
|
|
|
icu::MessageFormat* fFormatter;
|
2014-10-07 10:51:23 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|