2010-07-24 03:13:00 +04:00
|
|
|
/*
|
2011-11-23 22:55:34 +04:00
|
|
|
* Copyright 2010-2011, Oliver Tappe, zooey@hirschkaefer.de.
|
2010-07-24 03:13:00 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _ICU_COLLATE_DATA_H
|
|
|
|
#define _ICU_COLLATE_DATA_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "ICUCategoryData.h"
|
|
|
|
|
|
|
|
#include <unicode/coll.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace BPrivate {
|
2010-11-22 16:06:36 +03:00
|
|
|
namespace Libroot {
|
2010-07-24 03:13:00 +04:00
|
|
|
|
|
|
|
|
|
|
|
class ICUCollateData : public ICUCategoryData {
|
|
|
|
typedef ICUCategoryData inherited;
|
|
|
|
|
|
|
|
public:
|
2011-11-22 20:17:18 +04:00
|
|
|
ICUCollateData(pthread_key_t tlsKey);
|
2010-07-24 03:13:00 +04:00
|
|
|
virtual ~ICUCollateData();
|
|
|
|
|
2020-08-02 12:53:25 +03:00
|
|
|
virtual status_t SetTo(const U_NAMESPACE_QUALIFIER Locale&
|
|
|
|
locale,
|
|
|
|
const char* posixLocaleName);
|
2010-07-24 03:13:00 +04:00
|
|
|
virtual status_t SetToPosix();
|
|
|
|
|
|
|
|
status_t Strcoll(const char* a, const char* b, int& out);
|
|
|
|
status_t Strxfrm(char* out, const char* in, size_t size,
|
|
|
|
size_t& outSize);
|
2012-01-08 00:47:31 +04:00
|
|
|
status_t Wcscoll(const wchar_t* a, const wchar_t* b,
|
|
|
|
int& out);
|
|
|
|
status_t Wcsxfrm(wchar_t* out, const wchar_t* in,
|
|
|
|
size_t size, size_t& outSize);
|
2010-07-24 03:13:00 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
status_t _ToUnicodeString(const char* in,
|
2020-08-02 12:53:25 +03:00
|
|
|
U_NAMESPACE_QUALIFIER UnicodeString& out);
|
2010-07-24 03:13:00 +04:00
|
|
|
|
2020-08-02 12:53:25 +03:00
|
|
|
U_NAMESPACE_QUALIFIER Collator* fCollator;
|
2010-07-24 03:13:00 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-11-22 16:06:36 +03:00
|
|
|
} // namespace Libroot
|
2010-07-24 03:13:00 +04:00
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _ICU_COLLATE_DATA_H
|