sb140: #i117295# use rtl::Static
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <rtl/alloc.h>
|
||||
#include <rtl/instance.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
|
||||
#include <rtl/strbuf.hxx>
|
||||
@@ -313,6 +314,8 @@ void* RTTIHolder::generateRTTI( typelib_CompoundTypeDescription * pCompTypeDescr
|
||||
return pRTTI;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTIHolder, RTTISingleton > {};
|
||||
|
||||
//__________________________________________________________________________________________________
|
||||
|
||||
static void deleteException(
|
||||
@@ -345,23 +348,7 @@ void cc50_solaris_intel_raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cp
|
||||
// will be released by deleteException
|
||||
typelib_typedescriptionreference_getDescription( &pTypeDescr, pUnoExc->pType );
|
||||
|
||||
void* pRTTI;
|
||||
{
|
||||
static ::osl::Mutex aMutex;
|
||||
::osl::Guard< ::osl::Mutex > guard( aMutex );
|
||||
|
||||
static RTTIHolder * s_pRTTI = 0;
|
||||
if (! s_pRTTI)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_pRTTI = new RTTIHolder();
|
||||
#else
|
||||
static RTTIHolder s_aRTTI;
|
||||
s_pRTTI = &s_aRTTI;
|
||||
#endif
|
||||
}
|
||||
|
||||
pRTTI = s_pRTTI->generateRTTI( (typelib_CompoundTypeDescription *)pTypeDescr );
|
||||
pRTTI = RTTISingleton::get().generateRTTI( (typelib_CompoundTypeDescription *)pTypeDescr );
|
||||
}
|
||||
|
||||
// a must be
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <rtl/alloc.h>
|
||||
#include <rtl/instance.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
#include <typelib/typedescription.hxx>
|
||||
#include <com/sun/star/uno/Any.hxx>
|
||||
@@ -315,6 +316,8 @@ void* RTTIHolder::generateRTTI( typelib_CompoundTypeDescription * pCompTypeDescr
|
||||
return pRTTI;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTIHolder, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
static void deleteException(
|
||||
@@ -348,23 +351,7 @@ void cc50_solaris_sparc_raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cp
|
||||
// will be released by deleteException
|
||||
typelib_typedescriptionreference_getDescription( &pTypeDescr, pUnoExc->pType );
|
||||
|
||||
void* pRTTI;
|
||||
{
|
||||
static ::osl::Mutex aMutex;
|
||||
::osl::Guard< ::osl::Mutex > guard( aMutex );
|
||||
|
||||
static RTTIHolder * s_pRTTI = 0;
|
||||
if (! s_pRTTI)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_pRTTI = new RTTIHolder();
|
||||
#else
|
||||
static RTTIHolder s_aRTTI;
|
||||
s_pRTTI = &s_aRTTI;
|
||||
#endif
|
||||
}
|
||||
|
||||
pRTTI = s_pRTTI->generateRTTI( (typelib_CompoundTypeDescription *)pTypeDescr );
|
||||
pRTTI = RTTISingleton::get().generateRTTI( (typelib_CompoundTypeDescription *)pTypeDescr );
|
||||
}
|
||||
|
||||
// a must be
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -205,6 +206,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -240,21 +243,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -206,6 +207,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -253,21 +256,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -206,6 +207,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -240,22 +243,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -205,6 +206,8 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -251,22 +254,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -205,6 +206,8 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -251,22 +254,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -206,6 +207,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -240,22 +243,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <cxxabi.h>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -215,6 +216,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -261,22 +264,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -205,6 +206,8 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -251,22 +254,7 @@ namespace CPPU_CURRENT_NAMESPACE
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -202,6 +203,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -248,22 +251,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -206,6 +207,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -240,22 +243,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -206,6 +207,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -240,22 +243,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -206,6 +207,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -240,22 +243,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -206,6 +207,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -240,22 +243,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -205,6 +206,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -251,22 +254,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -35,9 +35,9 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <rtl/instance.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
#include <osl/mutex.hxx>
|
||||
|
||||
@@ -216,6 +216,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -231,11 +233,6 @@ static void deleteException( void * pExc )
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
struct theRTTI : public rtl::Static<RTTI, theRTTI> {};
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
{
|
||||
@@ -268,8 +265,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI &rRTTI = theRTTI::get();
|
||||
rtti = rRTTI.getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -206,6 +207,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -252,22 +255,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -205,6 +206,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -239,22 +242,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -206,6 +207,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -252,22 +255,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -204,6 +205,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -250,22 +253,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include <cxxabi.h>
|
||||
#include <boost/unordered_map.hpp>
|
||||
|
||||
#include <rtl/instance.hxx>
|
||||
#include <rtl/strbuf.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
@@ -191,6 +192,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
|
||||
return rtti;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTI, RTTISingleton > {};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
static void deleteException( void * pExc )
|
||||
{
|
||||
@@ -237,22 +240,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
|
||||
|
||||
// destruct uno exception
|
||||
::uno_any_destruct( pUnoExc, 0 );
|
||||
// avoiding locked counts
|
||||
static RTTI * s_rtti = 0;
|
||||
if (! s_rtti)
|
||||
{
|
||||
MutexGuard guard( Mutex::getGlobalMutex() );
|
||||
if (! s_rtti)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_rtti = new RTTI();
|
||||
#else
|
||||
static RTTI rtti_data;
|
||||
s_rtti = &rtti_data;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
rtti = (type_info *)RTTISingleton::get().getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
|
||||
TYPELIB_DANGER_RELEASE( pTypeDescr );
|
||||
OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
|
||||
if (! rtti)
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "rtl/alloc.h"
|
||||
#include <rtl/instance.hxx>
|
||||
#include "rtl/strbuf.hxx"
|
||||
#include "rtl/ustrbuf.hxx"
|
||||
|
||||
@@ -185,6 +186,7 @@ RTTInfos::~RTTInfos() throw ()
|
||||
}
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTInfos, RTTISingleton > {};
|
||||
|
||||
//##################################################################################################
|
||||
//#### Exception raising ###########################################################################
|
||||
@@ -455,21 +457,7 @@ void * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTypeDescr ) thro
|
||||
//##################################################################################################
|
||||
type_info * msci_getRTTI( OUString const & rUNOname )
|
||||
{
|
||||
static RTTInfos * s_pRTTIs = 0;
|
||||
if (! s_pRTTIs)
|
||||
{
|
||||
MutexGuard aGuard( Mutex::getGlobalMutex() );
|
||||
if (! s_pRTTIs)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_pRTTIs = new RTTInfos();
|
||||
#else
|
||||
static RTTInfos s_aRTTIs;
|
||||
s_pRTTIs = &s_aRTTIs;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return s_pRTTIs->getRTTI( rUNOname );
|
||||
return RTTISingleton::get().getRTTI( rUNOname );
|
||||
}
|
||||
|
||||
//##################################################################################################
|
||||
|
@@ -254,6 +254,7 @@ void
|
||||
#include <signal.h>
|
||||
|
||||
#include "rtl/alloc.h"
|
||||
#include <rtl/instance.hxx>
|
||||
#include "rtl/strbuf.hxx"
|
||||
#include "rtl/ustrbuf.hxx"
|
||||
|
||||
@@ -660,24 +661,12 @@ RaiseInfo * ExceptionInfos::getRaiseInfo( typelib_TypeDescription * pTD ) throw
|
||||
return pRaiseInfo;
|
||||
}
|
||||
|
||||
struct RTTISingleton: public rtl::Static< RTTInfos, RTTISingleton > {};
|
||||
|
||||
type_info * mscx_getRTTI(
|
||||
OUString const & rUNOname )
|
||||
{
|
||||
static RTTInfos * s_pRTTIs = 0;
|
||||
if (! s_pRTTIs)
|
||||
{
|
||||
MutexGuard aGuard( Mutex::getGlobalMutex() );
|
||||
if (! s_pRTTIs)
|
||||
{
|
||||
#ifdef LEAK_STATIC_DATA
|
||||
s_pRTTIs = new RTTInfos();
|
||||
#else
|
||||
static RTTInfos s_aRTTIs;
|
||||
s_pRTTIs = &s_aRTTIs;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return s_pRTTIs->getRTTI( rUNOname );
|
||||
return RTTISingleton::get().getRTTI( rUNOname );
|
||||
}
|
||||
|
||||
void mscx_raiseException(
|
||||
|
Reference in New Issue
Block a user