73de58376a
"Renaming" means the icu namespace is suffixed with the version number, atm icu_55. Using "renaming" allows to use two different versions of ICU, thus easing upgrades. For instance haikuwebkit uses a current version of ICU, while the system uses a newer one after an upgrade. * Replace all uses of the icu namespace in our public headers, with a macro defaulting to icu. As the namespace is only used for private fields pointers, there should be no impact. * Locale kit *.cpp have to import the macro from <unicode/uversion.h> *before* including any locale headers. Ditto for a Time preferences cpp file. This way, the correct current icu namespace is referenced. * Fixes bug #12057.
45 lines
898 B
C++
45 lines
898 B
C++
/*
|
|
* Copyright 2014-2015 Haiku, Inc. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Adrien Destugues, pulkomandy@pulkomandy.tk
|
|
* John Scipione, jscipione@gmail.com
|
|
*/
|
|
#ifndef _B_MESSAGE_FORMAT_H_
|
|
#define _B_MESSAGE_FORMAT_H_
|
|
|
|
|
|
#include <Format.h>
|
|
|
|
|
|
#ifndef U_ICU_NAMESPACE
|
|
#define U_ICU_NAMESPACE icu
|
|
#endif
|
|
namespace U_ICU_NAMESPACE {
|
|
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 int64 arg) const;
|
|
|
|
private:
|
|
status_t _Initialize(const U_ICU_NAMESPACE::UnicodeString&);
|
|
|
|
private:
|
|
U_ICU_NAMESPACE::MessageFormat* fFormatter;
|
|
};
|
|
|
|
|
|
#endif // _B_MESSAGE_FORMAT_H_
|