ReactOS 0.4.16-dev-122-g325d74c
collate_byname< char > Class Reference

#include <_collate.h>

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

Public Member Functions

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

Protected Member Functions

 ~collate_byname ()
 
virtual int do_compare (const char *, const char *, const char *, const char *) const
 
virtual string_type do_transform (const char *, const char *) const
 
- Protected Member Functions inherited from collate< char >
 ~collate ()
 
virtual int do_compare (const char *, const char *, const char *, const char *) const
 
virtual string_type do_transform (const char *, const char *) const
 
virtual long do_hash (const char *, const char *) 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< char > &)
 
collate_byname< char > & operator= (const collate_byname< char > &)
 

Private Attributes

_Locale_collate_M_collate
 

Friends

class _Locale_impl
 

Additional Inherited Members

- Public Types inherited from collate< char >
typedef char char_type
 
typedef string string_type
 
- Static Public Attributes inherited from collate< char >
static _STLP_STATIC_DECLSPEC locale::id id = { 1 }
 

Detailed Description

Definition at line 115 of file _collate.h.

Constructor & Destructor Documentation

◆ collate_byname() [1/3]

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

Definition at line 184 of file facets_byname.cpp.

185 : collate<char>(refs) {
186 if (!name)
188
189 int __err_code;
191 _M_collate = _STLP_PRIV __acquire_collate(name, buf, 0, &__err_code);
192 if (!_M_collate)
193 locale::_M_throw_on_creation_failure(__err_code, name, "collate");
194}
#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:130
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()

collate_byname< char >::~collate_byname ( )
protected

Definition at line 196 of file facets_byname.cpp.

void _STLP_CALL __release_collate(_Locale_collate *cat)

◆ collate_byname() [2/3]

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

Definition at line 128 of file _collate.h.

129 : _M_collate(__coll) {}

◆ collate_byname() [3/3]

Member Function Documentation

◆ do_compare()

int collate_byname< char >::do_compare ( const char __low1,
const char __high1,
const char __low2,
const char __high2 
) const
protectedvirtual

Reimplemented from collate< char >.

Definition at line 199 of file facets_byname.cpp.

202 {
204 __low1, __high1 - __low1,
205 __low2, __high2 - __low2);
206}
int _Locale_strcmp(struct _Locale_collate *, const char *, size_t, const char *, size_t)

◆ do_transform()

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

Reimplemented from collate< char >.

Definition at line 209 of file facets_byname.cpp.

209 {
210 if (low == high)
211 return string_type();
212
213 size_t n = _Locale_strxfrm(_M_collate, NULL, 0, low, high - low);
214
215 // NOT PORTABLE. What we're doing relies on internal details of the
216 // string implementation. (Contiguity of string elements and presence
217 // of trailing zero.)
218 string_type buf(n, 0);
219 _Locale_strxfrm(_M_collate, &(*buf.begin()), n + 1, low, high - low);
220 return buf;
221}
string string_type
Definition: _collate.h:46
#define NULL
Definition: types.h:112
GLdouble n
Definition: glext.h:7729
size_t _Locale_strxfrm(struct _Locale_collate *, char *, size_t, const char *, size_t)

◆ operator=()

Friends And Related Function Documentation

◆ _Locale_impl

friend class _Locale_impl
friend

Definition at line 116 of file _collate.h.

Member Data Documentation

◆ _M_collate

_Locale_collate* collate_byname< char >::_M_collate
private

Definition at line 130 of file _collate.h.


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