haiku/headers/os/locale/MessageFormat.h
Adrien Destugues 5d5ec05b1d B*Format: make immutable and remove locking
The language and formatting conventions can now only be set when
creating the objects. This removed the needs for locking them when
formatting to avoid some other thread changing the format while it's
being used.

Adjust tests and DeskBar TimeView to the API changes.
2014-10-27 14:08:42 +01:00

38 lines
651 B
C++

/*
* 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>
namespace icu {
class MessageFormat;
class UnicodeString;
}
class BMessageFormat: public BFormat {
public:
BMessageFormat(const BLanguage& language,
const BString pattern);
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;
};
#endif