00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _CPPUHELPER_IMPLBASE_EX_POST_HXX_
00020 #define _CPPUHELPER_IMPLBASE_EX_POST_HXX_
00021
00023
00024 #define __DEF_CLASS_DATA_INIT_EX( N, class_cast ) \
00025 { \
00026 N +1, sal_False, sal_False, \
00027 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \
00028 { \
00029 __IFC_EX_TYPE_INIT##N( class_cast ), \
00030 __IFC_EX_TYPE_INIT_NAME( class_cast, ::com::sun::star::lang::XTypeProvider ) \
00031 } \
00032 }
00033
00034 #define __DEF_IMPLHELPER_EX( N ) \
00035 namespace cppu \
00036 { \
00037 struct class_data##N \
00038 { \
00039 sal_Int16 m_nTypes; \
00040 sal_Bool m_storedTypeRefs; \
00041 sal_Bool m_storedId; \
00042 sal_Int8 m_id[ 16 ]; \
00043 type_entry m_typeEntries[ N + 1 ]; \
00044 }; \
00045 template< __CLASS_IFC##N > \
00046 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper##N \
00047 : public ::com::sun::star::lang::XTypeProvider \
00048 , __PUBLIC_IFC##N \
00049 { \
00050 static class_data##N s_cd; \
00051 public: \
00052 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \
00053 { return ImplHelper_query( rType, (class_data *)&s_cd, this ); } \
00054 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \
00055 { return ImplHelper_getTypes( (class_data *)&s_cd ); } \
00056 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \
00057 { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \
00058 }; \
00059 template< __CLASS_IFC##N > \
00060 class_data##N ImplHelper##N< __IFC##N >::s_cd = \
00061 __DEF_CLASS_DATA_INIT_EX( N, (ImplHelper##N< __IFC##N > *) ); \
00062 template< __CLASS_IFC##N > \
00063 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper##N \
00064 : public OWeakObject \
00065 , public ::com::sun::star::lang::XTypeProvider \
00066 , __PUBLIC_IFC##N \
00067 { \
00068 static class_data##N s_cd; \
00069 public: \
00070 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \
00071 { return WeakImplHelper_query( rType, (class_data *)&s_cd, this, (OWeakObject *)this ); } \
00072 virtual void SAL_CALL acquire() throw () \
00073 { OWeakObject::acquire(); } \
00074 virtual void SAL_CALL release() throw () \
00075 { OWeakObject::release(); } \
00076 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \
00077 { return WeakImplHelper_getTypes( (class_data *)&s_cd ); } \
00078 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \
00079 { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \
00080 }; \
00081 template< __CLASS_IFC##N > \
00082 class_data##N WeakImplHelper##N< __IFC##N >::s_cd = \
00083 __DEF_CLASS_DATA_INIT_EX( N, (WeakImplHelper##N< __IFC##N > *) ); \
00084 template< __CLASS_IFC##N > \
00085 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper##N \
00086 : public OWeakAggObject \
00087 , public ::com::sun::star::lang::XTypeProvider \
00088 , __PUBLIC_IFC##N \
00089 { \
00090 static class_data##N s_cd; \
00091 public: \
00092 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \
00093 { return OWeakAggObject::queryInterface( rType ); } \
00094 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \
00095 { return WeakAggImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (OWeakAggObject *)this ); } \
00096 virtual void SAL_CALL acquire() throw () \
00097 { OWeakAggObject::acquire(); } \
00098 virtual void SAL_CALL release() throw () \
00099 { OWeakAggObject::release(); } \
00100 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \
00101 { return WeakAggImplHelper_getTypes( (class_data *)&s_cd ); } \
00102 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \
00103 { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \
00104 }; \
00105 template< __CLASS_IFC##N > \
00106 class_data##N WeakAggImplHelper##N< __IFC##N >::s_cd = \
00107 __DEF_CLASS_DATA_INIT_EX( N, (WeakAggImplHelper##N< __IFC##N > *) ); \
00108 template< class BaseClass, __CLASS_IFC##N > \
00109 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper##N \
00110 : public BaseClass \
00111 , __PUBLIC_IFC##N \
00112 { \
00113 static class_data##N s_cd; \
00114 public: \
00115 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \
00116 { \
00117 ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) ); \
00118 if (aRet.hasValue()) \
00119 return aRet; \
00120 return BaseClass::queryInterface( rType ); \
00121 } \
00122 virtual void SAL_CALL acquire() throw () \
00123 { BaseClass::acquire(); } \
00124 virtual void SAL_CALL release() throw () \
00125 { BaseClass::release(); } \
00126 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \
00127 { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); } \
00128 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \
00129 { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \
00130 }; \
00131 template< class BaseClass, __CLASS_IFC##N > \
00132 class_data##N ImplInheritanceHelper##N< BaseClass, __IFC##N >::s_cd = \
00133 __DEF_CLASS_DATA_INIT_EX( N, (ImplInheritanceHelper##N< BaseClass, __IFC##N > *) ); \
00134 template< class BaseClass, __CLASS_IFC##N > \
00135 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper##N \
00136 : public BaseClass \
00137 , __PUBLIC_IFC##N \
00138 { \
00139 static class_data##N s_cd; \
00140 public: \
00141 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \
00142 { return BaseClass::queryInterface( rType ); } \
00143 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \
00144 { \
00145 ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) ); \
00146 if (aRet.hasValue()) \
00147 return aRet; \
00148 return BaseClass::queryAggregation( rType ); \
00149 } \
00150 virtual void SAL_CALL acquire() throw () \
00151 { BaseClass::acquire(); } \
00152 virtual void SAL_CALL release() throw () \
00153 { BaseClass::release(); } \
00154 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \
00155 { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); } \
00156 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \
00157 { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \
00158 }; \
00159 template< class BaseClass, __CLASS_IFC##N > \
00160 class_data##N AggImplInheritanceHelper##N< BaseClass, __IFC##N >::s_cd = \
00161 __DEF_CLASS_DATA_INIT_EX( N, (AggImplInheritanceHelper##N< BaseClass, __IFC##N > *) ); \
00162 }
00163
00165
00166 #endif
00167
00168