ReactOS  0.4.13-dev-259-g5ca9c9c
locale_impl.cpp File Reference
#include "stlport_prefix.h"
#include <locale>
#include <algorithm>
#include <typeinfo>
#include "c_locale.h"
#include "aligned_buffer.h"
#include "acquire_release.h"
#include "locale_impl.h"
Include dependency graph for locale_impl.cpp:

Go to the source code of this file.

Functions

static _STLP_BEGIN_NAMESPACE const string _Nameless ("*")
 
static bool is_C_locale_name (const char *name)
 
locale::facet *_STLP_CALL _get_facet (locale::facet *f)
 
void _STLP_CALL _release_facet (locale::facet *&f)
 
static void _Stl_loc_assign_ids ()
 
locale_Stl_get_classic_locale ()
 
locale_Stl_get_global_locale ()
 
_STLP_DECLSPEC _Locale_impl *_STLP_CALL _get_Locale_impl (_Locale_impl *loc)
 
void _STLP_CALL _release_Locale_impl (_Locale_impl *&loc)
 
_STLP_DECLSPEC _Locale_impl *_STLP_CALL _copy_Nameless_Locale_impl (_Locale_impl *loc)
 
_STLP_MOVE_TO_PRIV_NAMESPACE _STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const money_get< char, istreambuf_iterator< char, char_traits< char > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const money_put< char, ostreambuf_iterator< char, char_traits< char > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const money_get< wchar_t, istreambuf_iterator< wchar_t, char_traits< wchar_t > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const money_put< wchar_t, ostreambuf_iterator< wchar_t, char_traits< wchar_t > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const num_get< char, istreambuf_iterator< char, char_traits< char > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const num_get< wchar_t, istreambuf_iterator< wchar_t, char_traits< wchar_t > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const num_put< char, ostreambuf_iterator< char, char_traits< char > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const num_put< wchar_t, ostreambuf_iterator< wchar_t, char_traits< wchar_t > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const time_get< char, istreambuf_iterator< char, char_traits< char > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const time_put< char, ostreambuf_iterator< char, char_traits< char > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const time_get< wchar_t, istreambuf_iterator< wchar_t, char_traits< wchar_t > > > *)
 
_STLP_DECLSPEC locale::id &_STLP_CALL _GetFacetId (const time_put< wchar_t, ostreambuf_iterator< wchar_t, char_traits< wchar_t > > > *)
 

Variables

static _Stl_aligned_buffer< _Locale_impl::Init__Loc_init_buf
 
static locale_Stl_classic_locale = 0
 
static locale_Stl_global_locale = 0
 
static ios_base::Init _IosInit
 

Function Documentation

◆ _copy_Nameless_Locale_impl()

_STLP_DECLSPEC _Locale_impl* _STLP_CALL _copy_Nameless_Locale_impl ( _Locale_impl loc)

Definition at line 714 of file locale_impl.cpp.

715 {
716  _STLP_ASSERT( loc != 0 );
717  _Locale_impl *loc_new = new _Locale_impl(*loc);
718  loc_new->name = _Nameless;
719  return loc_new;
720 }
basic_string< char, char_traits< char >, allocator< char > > name
Definition: locale_impl.h:72
static _STLP_BEGIN_NAMESPACE const string _Nameless("*")
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

◆ _get_facet()

locale::facet* _STLP_CALL _get_facet ( locale::facet f)

Definition at line 36 of file locale_impl.cpp.

37 {
38  if (f != 0)
39  f->_M_incr();
40  return f;
41 }
GLfloat f
Definition: glext.h:7540
#define f
Definition: ke_i.h:83

Referenced by _Locale_impl::_Locale_impl(), and _Locale_impl::insert().

◆ _get_Locale_impl()

_STLP_DECLSPEC _Locale_impl* _STLP_CALL _get_Locale_impl ( _Locale_impl loc)

Definition at line 695 of file locale_impl.cpp.

696 {
697  _STLP_ASSERT( loc != 0 );
698  loc->_M_incr();
699  return loc;
700 }
__stl_atomic_t _M_incr()
Definition: _threads.h:479
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

Referenced by locale::global(), locale::locale(), and locale::operator=().

◆ _GetFacetId() [1/12]

◆ _GetFacetId() [2/12]

◆ _GetFacetId() [3/12]

◆ _GetFacetId() [4/12]

◆ _GetFacetId() [5/12]

Definition at line 737 of file locale_impl.cpp.

◆ _GetFacetId() [6/12]

◆ _GetFacetId() [7/12]

Definition at line 744 of file locale_impl.cpp.

◆ _GetFacetId() [8/12]

◆ _GetFacetId() [9/12]

◆ _GetFacetId() [10/12]

◆ _GetFacetId() [11/12]

◆ _GetFacetId() [12/12]

◆ _Nameless()

static _STLP_BEGIN_NAMESPACE const string _Nameless ( "*"  )
static

◆ _release_facet()

void _STLP_CALL _release_facet ( locale::facet *&  f)

Definition at line 43 of file locale_impl.cpp.

44 {
45  if ((f != 0) && (f->_M_decr() == 0)) {
46  delete f;
47  f = 0;
48  }
49 }
GLfloat f
Definition: glext.h:7540
#define f
Definition: ke_i.h:83

Referenced by _Locale_impl::insert(), and _Locale_impl::~_Locale_impl().

◆ _release_Locale_impl()

void _STLP_CALL _release_Locale_impl ( _Locale_impl *&  loc)

Definition at line 702 of file locale_impl.cpp.

703 {
704  _STLP_ASSERT( loc != 0 );
705  if (loc->_M_decr() == 0) {
706  if (*loc != *_Stl_classic_locale)
707  delete loc;
708  else
709  loc->~_Locale_impl();
710  loc = 0;
711  }
712 }
static locale * _Stl_classic_locale
__stl_atomic_t _M_decr()
Definition: _threads.h:480
#define _STLP_ASSERT(expr)
Definition: _debug.h:165

Referenced by locale::global(), locale::operator=(), and locale::~locale().

◆ _Stl_get_classic_locale()

locale* _Stl_get_classic_locale ( )

Definition at line 598 of file locale_impl.cpp.

598  {
599  static _Locale_impl::Init init;
600  return _Stl_classic_locale;
601 }
static int init
Definition: wintirpc.c:33
static locale * _Stl_classic_locale

Referenced by locale::classic().

◆ _Stl_get_global_locale()

locale* _Stl_get_global_locale ( )

Definition at line 603 of file locale_impl.cpp.

603  {
604  static _Locale_impl::Init init;
605  return _Stl_global_locale;
606 }
static int init
Definition: wintirpc.c:33
static locale * _Stl_global_locale

Referenced by locale::global().

◆ _Stl_loc_assign_ids()

static void _Stl_loc_assign_ids ( )
static

Definition at line 569 of file locale_impl.cpp.

569  {
570  // This assigns ids to every facet that is a member of a category,
571  // and also to money_get/put, num_get/put, and time_get/put
572  // instantiated using ordinary pointers as the input/output
573  // iterators. (The default is [io]streambuf_iterator.)
574 
581 
582 #ifndef _STLP_NO_WCHAR_T
589 #endif
590  // locale::id::_S_max = 27;
591 }
GLenum GLuint id
Definition: glext.h:5579

Referenced by _Locale_impl::_S_initialize().

◆ is_C_locale_name()

Variable Documentation

◆ __Loc_init_buf

_Stl_aligned_buffer<_Locale_impl::Init> __Loc_init_buf
static

Definition at line 55 of file locale_impl.cpp.

Referenced by _Locale_impl::_Locale_impl(), and _Locale_impl::~_Locale_impl().

◆ _IosInit

ios_base::Init _IosInit
static

Definition at line 621 of file locale_impl.cpp.

◆ _Stl_classic_locale

locale* _Stl_classic_locale = 0
static

◆ _Stl_global_locale

locale* _Stl_global_locale = 0
static

Definition at line 596 of file locale_impl.cpp.

Referenced by _Stl_get_global_locale(), and _Locale_impl::make_classic_locale().