ReactOS 0.4.16-dev-136-g52192f1
_Catalog_locale_map Struct Reference

#include <message_facets.h>

Collaboration diagram for _Catalog_locale_map:

Public Types

typedef hash_map< nl_catd_type, locale, hash< nl_catd_type >, equal_to< nl_catd_type >, allocator< pair< _STLP_CONST nl_catd_type, locale > > > map_type
 

Public Member Functions

 _Catalog_locale_map ()
 
 ~_Catalog_locale_map ()
 
void insert (nl_catd_type key, const locale &L)
 
locale lookup (nl_catd_type key) const
 
void erase (nl_catd_type key)
 

Public Attributes

map_typeM
 

Private Member Functions

 _Catalog_locale_map (const _Catalog_locale_map &)
 
void operator= (const _Catalog_locale_map &)
 

Detailed Description

Definition at line 35 of file message_facets.h.

Member Typedef Documentation

◆ map_type

Constructor & Destructor Documentation

◆ _Catalog_locale_map() [1/2]

_Catalog_locale_map::_Catalog_locale_map ( )
inline

Definition at line 36 of file message_facets.h.

36: M(0) {}

◆ ~_Catalog_locale_map()

_Catalog_locale_map::~_Catalog_locale_map ( )
inline

Definition at line 37 of file message_facets.h.

37{ if (M) delete M; }

◆ _Catalog_locale_map() [2/2]

_Catalog_locale_map::_Catalog_locale_map ( const _Catalog_locale_map )
private

Member Function Documentation

◆ erase()

void _Catalog_locale_map::erase ( nl_catd_type  key)

Definition at line 54 of file messages.cpp.

54 {
55 if (M)
56 M->erase(key);
57}
_STLP_TEMPLATE_FOR_CONT_EXT size_type erase(const _KT &__key)
Definition: _hash_map.h:218
Definition: copy.c:22

Referenced by _Messages::do_close().

◆ insert()

_STLP_BEGIN_NAMESPACE _STLP_MOVE_TO_PRIV_NAMESPACE void _Catalog_locale_map::insert ( nl_catd_type  key,
const locale L 
)

Definition at line 29 of file messages.cpp.

29 {
30 _STLP_TRY {
31#if !defined (_STLP_NO_TYPEINFO) && !defined (_STLP_NO_RTTI)
32 // Don't bother to do anything unless we're using a non-default ctype facet
33# ifdef _STLP_NO_WCHAR_T
34 typedef char _Char;
35# else
36 typedef wchar_t _Char;
37# endif
38
39 typedef ctype<_Char> wctype;
40 wctype const& wct = use_facet<wctype>(L);
41 if (typeid(wct) != typeid(wctype)) {
42#endif
43 if (!M)
44 M = new map_type;
45
47#if !defined (_STLP_NO_TYPEINFO) && !defined (_STLP_NO_RTTI)
48 }
49#endif
50 }
52}
Definition: _ctype.h:58
pair< _STLP_CONST key_type, data_type > value_type
Definition: _hash_map.h:56
pair< iterator, bool > insert(const value_type &__obj)
Definition: _hash_map.h:179
#define _STLP_TRY
Definition: features.h:817
#define _STLP_CATCH_ALL
Definition: features.h:818
wctype_t __cdecl wctype(const char *)
#define L(x)
Definition: ntvdm.h:50
hash_map< nl_catd_type, locale, hash< nl_catd_type >, equal_to< nl_catd_type >, allocator< pair< _STLP_CONST nl_catd_type, locale > > > map_type

Referenced by _Messages::do_open().

◆ lookup()

locale _Catalog_locale_map::lookup ( nl_catd_type  key) const

Definition at line 59 of file messages.cpp.

59 {
60 if (M) {
62 return i != M->end() ? (*i).second : locale::classic();
63 }
64 else
65 return locale::classic();
66}
_STLP_TEMPLATE_FOR_CONT_EXT iterator find(const _KT &__key)
Definition: _hash_map.h:195
iterator end()
Definition: _hash_map.h:174
_Ht::const_iterator const_iterator
Definition: _hash_map.h:76
static const locale &_STLP_CALL classic()
Definition: locale.cpp:404
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by _Messages::do_get().

◆ operator=()

void _Catalog_locale_map::operator= ( const _Catalog_locale_map )
private

Member Data Documentation

◆ M

map_type* _Catalog_locale_map::M

Definition at line 45 of file message_facets.h.

Referenced by erase(), insert(), lookup(), and ~_Catalog_locale_map().


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