ReactOS 0.4.15-dev-7924-g5949c20
collate_byname< wchar_t > Class Reference

#include <_collate.h>

Inheritance diagram for collate_byname< wchar_t >:
Collaboration diagram for collate_byname< wchar_t >:

Public Member Functions

 collate_byname (const char *__name, size_t __refs=0)
 
- Public Member Functions inherited from collate< wchar_t >
 collate (size_t __refs=0)
 
int compare (const wchar_t *__low1, const wchar_t *__high1, const wchar_t *__low2, const wchar_t *__high2) const
 
string_type transform (const wchar_t *__low, const wchar_t *__high) const
 
long hash (const wchar_t *__low, const wchar_t *__high) const
 

Protected Member Functions

 ~collate_byname ()
 
virtual int do_compare (const wchar_t *, const wchar_t *, const wchar_t *, const wchar_t *) const
 
virtual string_type do_transform (const wchar_t *, const wchar_t *) const
 
- Protected Member Functions inherited from collate< wchar_t >
 ~collate ()
 
virtual int do_compare (const wchar_t *, const wchar_t *, const wchar_t *, const wchar_t *) const
 
virtual string_type do_transform (const wchar_t *, const wchar_t *) const
 
virtual long do_hash (const wchar_t *__low, const wchar_t *__high) const
 
- Protected Member Functions inherited from locale::facet
 facet (size_t __init_count=0)
 
virtual ~facet ()
 
- Protected Member Functions inherited from _Refcount_Base
 _Refcount_Base (__stl_atomic_t __n)
 
__stl_atomic_t _M_incr ()
 
__stl_atomic_t _M_decr ()
 

Private Member Functions

 collate_byname (_Locale_collate *__coll)
 
 collate_byname (const collate_byname< wchar_t > &)
 
collate_byname< wchar_t > & operator= (const collate_byname< wchar_t > &)
 

Private Attributes

_Locale_collate_M_collate
 

Friends

class _Locale_impl
 

Additional Inherited Members

- Public Types inherited from collate< wchar_t >
typedef wchar_t char_type
 
typedef wstring string_type
 
- Static Public Attributes inherited from collate< wchar_t >
static _STLP_STATIC_DECLSPEC locale::id id = { 14 }
 

Detailed Description

Definition at line 138 of file _collate.h.

Constructor & Destructor Documentation

◆ collate_byname() [1/3]

collate_byname< wchar_t >::collate_byname ( const char __name,
size_t  __refs = 0 
)
explicit

Definition at line 231 of file facets_byname.cpp.

232 : collate<wchar_t>(refs) {
233 if (!name)
235
236 int __err_code;
238 _M_collate = _STLP_PRIV __acquire_collate(name, buf, 0, &__err_code);
239 if (!_M_collate)
240 locale::_M_throw_on_creation_failure(__err_code, name, "collate");
241}
#define _STLP_PRIV
Definition: _dm.h:70
_Locale_collate *_STLP_CALL __acquire_collate(const char *&name, char *buf, _Locale_name_hint *hint, int *__err_code)
_Locale_collate * _M_collate
Definition: _collate.h:153
static void _STLP_FUNCTION_THROWS _STLP_CALL _M_throw_on_null_name()
Definition: locale.cpp:57
static void _STLP_FUNCTION_THROWS _STLP_CALL _M_throw_on_creation_failure(int __err_code, const char *name, const char *facet)
Definition: locale.cpp:68
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define _Locale_MAX_SIMPLE_NAME
Definition: c_locale.h:54
Definition: name.c:39

◆ ~collate_byname()

Definition at line 243 of file facets_byname.cpp.

void _STLP_CALL __release_collate(_Locale_collate *cat)

◆ collate_byname() [2/3]

collate_byname< wchar_t >::collate_byname ( _Locale_collate __coll)
inlineprivate

Definition at line 151 of file _collate.h.

152 : _M_collate(__coll) {}

◆ collate_byname() [3/3]

Member Function Documentation

◆ do_compare()

int collate_byname< wchar_t >::do_compare ( const wchar_t low1,
const wchar_t high1,
const wchar_t low2,
const wchar_t high2 
) const
protectedvirtual

Reimplemented from collate< wchar_t >.

Definition at line 246 of file facets_byname.cpp.

249 {
251 low1, high1 - low1,
252 low2, high2 - low2);
253}
int _WLocale_strcmp(struct _Locale_collate *, const wchar_t *, size_t, const wchar_t *, size_t)

◆ do_transform()

collate_byname< wchar_t >::string_type collate_byname< wchar_t >::do_transform ( const wchar_t low,
const wchar_t high 
) const
protectedvirtual

Reimplemented from collate< wchar_t >.

Definition at line 256 of file facets_byname.cpp.

257 {
258 if (low == high)
259 return string_type();
260
261 size_t n = _WLocale_strxfrm(_M_collate, NULL, 0, low, high - low);
262
263 // NOT PORTABLE. What we're doing relies on internal details of the
264 // string implementation. (Contiguity of string elements and presence
265 // of trailing zero.)
266 string_type buf(n, 0);
267 _WLocale_strxfrm(_M_collate, &(*buf.begin()), n + 1, low, high - low);
268 return buf;
269}
wstring string_type
Definition: _collate.h:82
#define NULL
Definition: types.h:112
GLdouble n
Definition: glext.h:7729
size_t _WLocale_strxfrm(struct _Locale_collate *, wchar_t *, size_t, const wchar_t *, size_t)

◆ operator=()

Friends And Related Function Documentation

◆ _Locale_impl

friend class _Locale_impl
friend

Definition at line 139 of file _collate.h.

Member Data Documentation

◆ _M_collate

_Locale_collate* collate_byname< wchar_t >::_M_collate
private

Definition at line 153 of file _collate.h.


The documentation for this class was generated from the following files: