xref: /haiku/headers/os/locale/StringFormat.h (revision 02354704729d38c3b078c696adc1bbbd33cbcf72)
1 /*
2  * Copyright 2014-2015 Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Adrien Destugues, pulkomandy@pulkomandy.tk
7  *		John Scipione, jscipione@gmail.com
8  */
9 #ifndef _B_STRING_FORMAT_H_
10 #define _B_STRING_FORMAT_H_
11 
12 
13 #include <Format.h>
14 
15 
16 #ifndef U_ICU_NAMESPACE
17   #define U_ICU_NAMESPACE icu
18 #endif
19 namespace U_ICU_NAMESPACE {
20 	class MessageFormat;
21 	class UnicodeString;
22 }
23 
24 
25 class BStringFormat : public BFormat {
26 public:
27 								BStringFormat(const BLanguage& language,
28 									const BString pattern);
29 								BStringFormat(const BString pattern);
30 								~BStringFormat();
31 
32 			status_t			InitCheck();
33 
34 			status_t			Format(BString& buffer, const int64 arg) const;
35 
36 private:
37 			status_t			_Initialize(const U_ICU_NAMESPACE::UnicodeString&);
38 
39 private:
40 			U_ICU_NAMESPACE::MessageFormat*	fFormatter;
41 };
42 
43 
44 #endif	// _B_STRING_FORMAT_H_
45