32#ifndef _RWSTD_LOC_COLLATE_H_INCLUDED
33#define _RWSTD_LOC_COLLATE_H_INCLUDED
37# pragma GCC system_header
50template <
class _CharT>
54#ifndef _RWSTD_NO_EXT_COLLATE_PRIMARY
57template <
class _CharT>
58class collate:
public _RW::__rw_facet
61 typedef _CharT char_type;
62 typedef basic_string<char_type, char_traits<char_type>,
63 allocator<char_type> >
66 explicit collate (_RWSTD_SIZE_T __refs = 0)
67 : _RW::__rw_facet (__refs) { }
72 compare (
const char_type* __low1,
const char_type* __high1,
73 const char_type* __low2,
const char_type* __high2)
const {
74 return do_compare (__low1, __high1, __low2, __high2);
78 transform (
const char_type* __low,
const char_type* __high)
const {
79 return do_transform (__low, __high);
83 hash (
const char_type* __low,
const char_type* __high)
const {
84 return do_hash (__low, __high);
87 static _RW::__rw_facet_id id;
93 do_compare (
const char_type*,
const char_type*,
94 const char_type*,
const char_type*)
const;
97 do_transform (
const char_type*,
const char_type*)
const;
100 do_hash (
const char_type*,
const char_type*)
const;
110 typedef char char_type;
111 typedef basic_string<char_type, char_traits<char_type>,
112 allocator<char_type> >
115 explicit collate (_RWSTD_SIZE_T __refs = 0)
116 : _RW::__rw_facet (__refs) { }
121 compare (
const char_type* __low1,
const char_type* __high1,
122 const char_type* __low2,
const char_type* __high2)
const {
123 return do_compare (__low1, __high1, __low2, __high2);
127 transform (
const char_type* __low,
const char_type* __high)
const {
128 return do_transform (__low, __high);
132 hash (
const char_type* __low,
const char_type* __high)
const {
133 return do_hash (__low, __high);
136 static _RW::__rw_facet_id id;
141 do_compare (
const char_type*,
const char_type*,
142 const char_type*,
const char_type*)
const;
145 do_transform (
const char_type*,
const char_type*)
const;
148 do_hash (
const char_type*,
const char_type*)
const;
152#ifndef _RWSTD_NO_WCHAR_T
158 typedef wchar_t char_type;
159 typedef basic_string<char_type, char_traits<char_type>,
160 allocator<char_type> >
163 explicit collate (_RWSTD_SIZE_T __refs = 0)
_THROWS (())
164 : _RW::__rw_facet (__refs) { }
169 compare (
const char_type* __low1,
const char_type* __high1,
170 const char_type* __low2,
const char_type* __high2)
const {
171 return do_compare (__low1, __high1, __low2, __high2);
175 transform (
const char_type* __low,
const char_type* __high)
const {
176 return do_transform (__low, __high);
180 hash (
const char_type* __low,
const char_type* __high)
const {
181 return do_hash (__low, __high);
184 static _RW::__rw_facet_id id;
189 do_compare (
const char_type*,
const char_type*,
190 const char_type*,
const char_type*)
const;
193 do_transform (
const char_type*,
const char_type*)
const;
196 do_hash (
const char_type*,
const char_type*)
const;
202template <
class _CharT>
203class collate_byname:
public collate<_CharT>
205 char _C_namebuf [32];
209 explicit collate_byname (
const char *__name, _RWSTD_SIZE_T __ref = 0)
210 : collate<_CharT>(__ref) {
211 this->_C_set_name (__name, _C_namebuf,
sizeof _C_namebuf);
217class _RWSTD_EXPORT collate_byname<char>:
public collate<char>
219 char _C_namebuf [32];
222 explicit collate_byname (
const char* __name, _RWSTD_SIZE_T __ref = 0)
223 : collate<char_type>(__ref){
224 this->_C_set_name (__name, _C_namebuf,
sizeof _C_namebuf);
232 do_compare (
const char_type*,
const char_type*,
233 const char_type*,
const char_type*)
const;
236 do_transform (
const char_type*,
const char_type*)
const;
240#ifndef _RWSTD_NO_WCHAR_T
245 char _C_namebuf [32];
248 explicit collate_byname (
const char* __name, _RWSTD_SIZE_T __ref = 0)
249 : collate<char_type>(__ref){
250 this->_C_set_name (__name, _C_namebuf,
sizeof _C_namebuf);
258 do_compare (
const char_type*,
const char_type*,
259 const char_type*,
const char_type*)
const;
262 do_transform (
const char_type*,
const char_type*)
const;
270#if _RWSTD_DEFINE_TEMPLATE (_COLLATE)
#define _RWSTD_SPECIALIZED_CLASS
#define _RWSTD_NAMESPACE(name)
#define _RWSTD_ATTRIBUTE_NOTHROW