sl@0: /* sl@0: * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. sl@0: * sl@0: * Copyright (c) 1994 sl@0: * Hewlett-Packard Company sl@0: * sl@0: * Copyright (c) 1996,1997 sl@0: * Silicon Graphics Computer Systems, Inc. sl@0: * sl@0: * Copyright (c) 1997 sl@0: * Moscow Center for SPARC Technology sl@0: * sl@0: * Copyright (c) 1999 sl@0: * Boris Fomitchev sl@0: * sl@0: * This material is provided "as is", with absolutely no warranty expressed sl@0: * or implied. Any use is at your own risk. sl@0: * sl@0: * Permission to use or copy this software for any purpose is hereby granted sl@0: * without fee, provided the above notices are retained on all copies. sl@0: * Permission to modify the code and to distribute modified code is granted, sl@0: * provided the above notices are retained, and a notice that the code was sl@0: * modified is included with the above copyright notice. sl@0: * sl@0: */ sl@0: sl@0: # define __PUT_STATIC_DATA_MEMBERS_HERE sl@0: # define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION sl@0: sl@0: # include "stlport_prefix.h" sl@0: sl@0: # if !defined(_STLP_DEBUG) && ! defined (_STLP_ASSERTIONS) sl@0: # define _STLP_ASSERTIONS 1 sl@0: # endif sl@0: sl@0: #include sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: # if ( _STLP_STATIC_TEMPLATE_DATA < 1 ) sl@0: // for rope, locale static members sl@0: # include sl@0: # include sl@0: # endif sl@0: sl@0: # if defined (_STLP_UNIX) sl@0: # define _STLP_HAS_PERTHREAD_ALLOCATOR sl@0: # include sl@0: # endif sl@0: sl@0: // boris : this piece of code duplicated from _range_errors.h sl@0: #undef _STLP_THROW_MSG sl@0: #if defined(_STLP_THROW_RANGE_ERRORS) sl@0: # ifndef _STLP_STDEXCEPT sl@0: # include sl@0: # endif sl@0: # ifndef _STLP_STRING sl@0: # include sl@0: # endif sl@0: # define _STLP_THROW_MSG(ex,msg) throw ex(string(msg)) sl@0: #else sl@0: # if defined (_STLP_WINCE) sl@0: # define _STLP_THROW_MSG(ex,msg) TerminateProcess(GetCurrentProcess(), 0) sl@0: # else sl@0: # include sl@0: # include sl@0: # define _STLP_THROW_MSG(ex,msg) puts(msg),_STLP_ABORT() sl@0: # endif sl@0: #endif sl@0: sl@0: #ifdef _STLP_MSVC sl@0: #pragma optimize("g",off) sl@0: #endif sl@0: sl@0: _STLP_BEGIN_NAMESPACE sl@0: sl@0: _STLP_EXP_DECLSPEC void _STLP_CALL __stl_throw_range_error(const char* __msg) { sl@0: _STLP_THROW_MSG(range_error, __msg); sl@0: } sl@0: sl@0: _STLP_EXP_DECLSPEC void _STLP_CALL __stl_throw_out_of_range(const char* __msg) { sl@0: _STLP_THROW_MSG(out_of_range, __msg); sl@0: } sl@0: sl@0: _STLP_EXP_DECLSPEC void _STLP_CALL __stl_throw_length_error(const char* __msg) { sl@0: _STLP_THROW_MSG(length_error, __msg); sl@0: } sl@0: sl@0: _STLP_EXP_DECLSPEC void _STLP_CALL __stl_throw_invalid_argument(const char* __msg) { sl@0: _STLP_THROW_MSG(invalid_argument, __msg); sl@0: } sl@0: sl@0: _STLP_EXP_DECLSPEC void _STLP_CALL __stl_throw_overflow_error(const char* __msg) { sl@0: _STLP_THROW_MSG(overflow_error, __msg); sl@0: } sl@0: sl@0: _STLP_EXP_DECLSPEC const char* _STLP_CALL sl@0: __get_c_string(const string& __str) { sl@0: return __str.c_str(); sl@0: } sl@0: sl@0: sl@0: # if defined (_STLP_NO_EXCEPTION_HEADER) || defined(_STLP_BROKEN_EXCEPTION_CLASS) sl@0: _STLP_EXP_DECLSPEC exception::exception() _STLP_NOTHROW {} sl@0: _STLP_EXP_DECLSPEC exception::~exception() _STLP_NOTHROW {} sl@0: _STLP_EXP_DECLSPEC bad_exception::bad_exception() _STLP_NOTHROW {} sl@0: _STLP_EXP_DECLSPEC bad_exception::~bad_exception() _STLP_NOTHROW {} sl@0: _STLP_EXP_DECLSPEC const char* exception::what() const _STLP_NOTHROW {return "class exception";} sl@0: _STLP_EXP_DECLSPEC const char* bad_exception::what() const _STLP_NOTHROW {return "class bad_exception";} sl@0: # endif sl@0: sl@0: # ifdef _STLP_OWN_STDEXCEPT sl@0: _STLP_EXP_DECLSPEC __Named_exception::__Named_exception(const string& __str) { sl@0: strncpy(_M_name, __get_c_string(__str), _S_bufsize); sl@0: _M_name[_S_bufsize - 1] = '\0'; sl@0: } sl@0: sl@0: _STLP_EXP_DECLSPEC const char* __Named_exception::what() const _STLP_NOTHROW_INHERENTLY { return _M_name; } sl@0: sl@0: // boris : those are needed to force typeinfo nodes to be created in here only sl@0: _STLP_EXP_DECLSPEC __Named_exception::~__Named_exception() _STLP_NOTHROW_INHERENTLY {} sl@0: sl@0: _STLP_EXP_DECLSPEC logic_error::logic_error(const string& __s) : __Named_exception(__s) {} sl@0: _STLP_EXP_DECLSPEC logic_error::~logic_error() _STLP_NOTHROW_INHERENTLY {} sl@0: sl@0: _STLP_EXP_DECLSPEC runtime_error::runtime_error(const string& __s) : __Named_exception(__s) {} sl@0: _STLP_EXP_DECLSPEC runtime_error::~runtime_error() _STLP_NOTHROW_INHERENTLY {} sl@0: sl@0: _STLP_EXP_DECLSPEC domain_error::domain_error(const string& __arg) : logic_error(__arg) {} sl@0: _STLP_EXP_DECLSPEC domain_error::~domain_error() _STLP_NOTHROW_INHERENTLY {} sl@0: sl@0: _STLP_EXP_DECLSPEC invalid_argument::invalid_argument(const string& __arg) sl@0: : logic_error(__arg) {} sl@0: _STLP_EXP_DECLSPEC invalid_argument::~invalid_argument() _STLP_NOTHROW_INHERENTLY {} sl@0: sl@0: _STLP_EXP_DECLSPEC length_error::length_error(const string& __arg) : logic_error(__arg) {} sl@0: _STLP_EXP_DECLSPEC length_error::~length_error() _STLP_NOTHROW_INHERENTLY {} sl@0: sl@0: _STLP_EXP_DECLSPEC out_of_range::out_of_range(const string& __arg) : logic_error(__arg) {} sl@0: _STLP_EXP_DECLSPEC out_of_range::~out_of_range() _STLP_NOTHROW_INHERENTLY {} sl@0: sl@0: _STLP_EXP_DECLSPEC range_error::range_error(const string& __arg) : runtime_error(__arg) {} sl@0: _STLP_EXP_DECLSPEC range_error::~range_error() _STLP_NOTHROW_INHERENTLY {} sl@0: sl@0: _STLP_EXP_DECLSPEC overflow_error::overflow_error(const string& __arg) : runtime_error(__arg) {} sl@0: _STLP_EXP_DECLSPEC overflow_error::~overflow_error() _STLP_NOTHROW_INHERENTLY {} sl@0: sl@0: _STLP_EXP_DECLSPEC underflow_error::underflow_error(const string& __arg) : runtime_error(__arg) {} sl@0: _STLP_EXP_DECLSPEC underflow_error::~underflow_error() _STLP_NOTHROW_INHERENTLY {} sl@0: sl@0: # endif sl@0: sl@0: # ifdef _STLP_NO_BAD_ALLOC sl@0: #ifdef __WINSCW__ sl@0: const nothrow_t nothrowObj /* = {} */; sl@0: _STLP_EXP_DECLSPEC const nothrow_t& GetNoThrowObj() sl@0: { sl@0: return nothrowObj; sl@0: } sl@0: sl@0: #endif sl@0: # endif sl@0: sl@0: # ifndef _STLP_NO_FORCE_INSTANTIATE sl@0: sl@0: # if defined (_STLP_DEBUG) || defined (_STLP_ASSERTIONS) sl@0: template struct _STLP_CLASS_DECLSPEC __stl_debug_engine; sl@0: # endif sl@0: sl@0: #ifndef __SYMBIAN32__ sl@0: template class _STLP_CLASS_DECLSPEC __node_alloc; sl@0: template class _STLP_CLASS_DECLSPEC __node_alloc; sl@0: template class _STLP_CLASS_DECLSPEC __debug_alloc< __node_alloc >; sl@0: template class _STLP_CLASS_DECLSPEC __debug_alloc< __node_alloc >; sl@0: template class _STLP_CLASS_DECLSPEC __debug_alloc<__new_alloc>; sl@0: template class _STLP_CLASS_DECLSPEC __malloc_alloc<0>; sl@0: #endif sl@0: sl@0: # if defined (_STLP_THREADS) && ! defined ( _STLP_ATOMIC_EXCHANGE ) && (defined(_STLP_PTHREADS) || defined (_STLP_UITHREADS) || defined (_STLP_OS2THREADS)) sl@0: template class _STLP_CLASS_DECLSPEC _Swap_lock_struct<0>; sl@0: # endif sl@0: sl@0: template class allocator; sl@0: template class _STLP_alloc_proxy >; sl@0: template class _Vector_base >; sl@0: # if defined (_STLP_DEBUG) && ! defined (__SUNPRO_CC) sl@0: template class __WORKAROUND_DBG_RENAME(vector) >; sl@0: # endif sl@0: template class __vector__ >; sl@0: sl@0: template class _Rb_global; sl@0: template class _List_global; sl@0: template class _Sl_global; sl@0: template class _Stl_prime; sl@0: template class _LimG; sl@0: template class _Bs_G; sl@0: sl@0: template class _STLP_CLASS_DECLSPEC allocator; sl@0: template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy >; sl@0: template class _STLP_CLASS_DECLSPEC _String_base >; sl@0: sl@0: # if defined (_STLP_DEBUG) && ! defined (__SUNPRO_CC) sl@0: template class _STLP_CLASS_DECLSPEC _Nondebug_string, allocator >; sl@0: # endif sl@0: sl@0: template class basic_string, allocator >; sl@0: # endif sl@0: sl@0: _STLP_END_NAMESPACE sl@0: sl@0: #define FORCE_SYMBOL extern sl@0: sl@0: # if defined (_WIN32) && defined (_STLP_USE_DECLSPEC) && ! defined (_STLP_USE_STATIC_LIB) && ! defined (_STLP_USE_STATICX_LIB) && !defined (__SYMBIAN32__) sl@0: // stlportmt.cpp : Defines the entry point for the DLL application. sl@0: // sl@0: #define WIN32_LEAN_AND_MEAN sl@0: #include sl@0: sl@0: #undef FORCE_SYMBOL sl@0: #define FORCE_SYMBOL APIENTRY sl@0: sl@0: extern "C" { sl@0: sl@0: BOOL APIENTRY DllMain( HANDLE hModule, sl@0: DWORD ul_reason_for_call, sl@0: LPVOID lpReserved sl@0: ) sl@0: { sl@0: switch (ul_reason_for_call) sl@0: { sl@0: case DLL_PROCESS_ATTACH: sl@0: DisableThreadLibraryCalls((HINSTANCE)hModule); sl@0: case DLL_THREAD_ATTACH: sl@0: case DLL_THREAD_DETACH: sl@0: case DLL_PROCESS_DETACH: sl@0: break; sl@0: } sl@0: return TRUE; sl@0: } sl@0: sl@0: } /* extern "C" */ sl@0: sl@0: _STLP_BEGIN_NAMESPACE sl@0: sl@0: void FORCE_SYMBOL sl@0: force_link() sl@0: { sl@0: float f; sl@0: f = numeric_limits::infinity(); sl@0: f = numeric_limits::quiet_NaN(); sl@0: f = numeric_limits::signaling_NaN(); sl@0: double d; sl@0: d = numeric_limits::infinity(); sl@0: d = numeric_limits::quiet_NaN(); sl@0: d = numeric_limits::signaling_NaN(); sl@0: #ifndef _STLP_NO_LONG_DOUBLE sl@0: long double ld; sl@0: ld = numeric_limits::infinity(); sl@0: ld = numeric_limits::quiet_NaN(); sl@0: ld = numeric_limits::signaling_NaN(); sl@0: #endif sl@0: sl@0: set::iterator iter; sl@0: // _M_increment; _M_decrement instantiation sl@0: ++iter; sl@0: --iter; sl@0: sl@0: // force bitset globals to be instantiated sl@0: unsigned char uc = _Bs_G::_S_bit_count[0]; sl@0: uc += _Bs_G::_S_first_one[0]; sl@0: } sl@0: sl@0: _STLP_END_NAMESPACE sl@0: sl@0: sl@0: # endif