2014-10-07 10:51:23 +04:00
|
|
|
/*
|
2015-03-04 22:27:00 +03:00
|
|
|
* Copyright 2014-2015 Haiku, Inc. All rights reserved.
|
2014-10-07 10:51:23 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
2015-03-04 22:27:00 +03:00
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Adrien Destugues, pulkomandy@pulkomandy.tk
|
|
|
|
* John Scipione, jscipione@gmail.com
|
2014-10-07 10:51:23 +04:00
|
|
|
*/
|
|
|
|
#ifndef _B_MESSAGE_FORMAT_H_
|
|
|
|
#define _B_MESSAGE_FORMAT_H_
|
|
|
|
|
|
|
|
|
|
|
|
#include <Format.h>
|
|
|
|
|
|
|
|
|
2015-05-10 22:13:59 +03:00
|
|
|
#ifndef U_ICU_NAMESPACE
|
|
|
|
#define U_ICU_NAMESPACE icu
|
|
|
|
#endif
|
|
|
|
namespace U_ICU_NAMESPACE {
|
2014-10-08 17:12:48 +04:00
|
|
|
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();
|
|
|
|
|
2015-03-04 23:40:55 +03:00
|
|
|
status_t Format(BString& buffer, const int64 arg) const;
|
2014-10-08 17:12:48 +04:00
|
|
|
|
|
|
|
private:
|
2015-05-10 22:13:59 +03:00
|
|
|
status_t _Initialize(const U_ICU_NAMESPACE::UnicodeString&);
|
2014-10-08 17:12:48 +04:00
|
|
|
|
|
|
|
private:
|
2015-05-10 22:13:59 +03:00
|
|
|
U_ICU_NAMESPACE::MessageFormat* fFormatter;
|
2014-10-07 10:51:23 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-03-04 22:22:56 +03:00
|
|
|
#endif // _B_MESSAGE_FORMAT_H_
|