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
|
|
|
*/
|
2018-08-14 03:49:00 +03:00
|
|
|
#ifndef _B_STRING_FORMAT_H_
|
|
|
|
#define _B_STRING_FORMAT_H_
|
2014-10-07 10:51:23 +04:00
|
|
|
|
|
|
|
|
|
|
|
#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;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-08-14 03:49:00 +03:00
|
|
|
class BStringFormat : public BFormat {
|
2014-10-07 10:51:23 +04:00
|
|
|
public:
|
2018-08-14 03:49:00 +03:00
|
|
|
BStringFormat(const BLanguage& language,
|
2014-10-27 11:05:48 +03:00
|
|
|
const BString pattern);
|
2018-08-14 03:49:00 +03:00
|
|
|
BStringFormat(const BString pattern);
|
|
|
|
~BStringFormat();
|
2014-10-08 17:12:48 +04:00
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
|
2018-08-14 03:49:00 +03:00
|
|
|
#endif // _B_STRING_FORMAT_H_
|