xref: /haiku/headers/private/libroot/locale/ICUCollateData.h (revision e0ef64750f3169cd634bb2f7a001e22488b05231)
1 /*
2  * Copyright 2010, Oliver Tappe, zooey@hirschkaefer.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _ICU_COLLATE_DATA_H
6 #define _ICU_COLLATE_DATA_H
7 
8 
9 #include "ICUCategoryData.h"
10 
11 #include <unicode/coll.h>
12 
13 
14 namespace BPrivate {
15 
16 
17 class ICUCollateData : public ICUCategoryData {
18 	typedef	ICUCategoryData		inherited;
19 
20 public:
21 								ICUCollateData();
22 	virtual						~ICUCollateData();
23 
24 	virtual	status_t			SetTo(const Locale& locale,
25 										const char* posixLocaleName);
26 	virtual	status_t			SetToPosix();
27 
28 			status_t			Strcoll(const char* a, const char* b, int& out);
29 			status_t			Strxfrm(char* out, const char* in, size_t size,
30 									size_t& outSize);
31 
32 private:
33 			status_t			_ToUnicodeString(const char* in,
34 									UnicodeString& out);
35 
36 			Collator*			fCollator;
37 };
38 
39 
40 }	// namespace BPrivate
41 
42 
43 #endif	// _ICU_COLLATE_DATA_H
44