00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _CPPUHELPER_IMPLBASE8_HXX_
00020 #define _CPPUHELPER_IMPLBASE8_HXX_
00021
00022 #include <cppuhelper/implbase_ex.hxx>
00023 #include <rtl/instance.hxx>
00024
00025 namespace cppu
00026 {
00028
00029 struct class_data8
00030 {
00031 sal_Int16 m_nTypes;
00032 sal_Bool m_storedTypeRefs;
00033 sal_Bool m_storedId;
00034 sal_Int8 m_id[ 16 ];
00035 type_entry m_typeEntries[ 8 + 1 ];
00036 };
00037
00038 template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Impl >
00039 struct ImplClassData8
00040 {
00041 class_data* operator ()()
00042 {
00043 static class_data8 s_cd =
00044 {
00045 8 +1, sal_False, sal_False,
00046 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
00047 {
00048 { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 },
00049 { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 },
00050 { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 },
00051 { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 },
00052 { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 },
00053 { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 },
00054 { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 },
00055 { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 },
00056 { { com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 }
00057 }
00058 };
00059 return reinterpret_cast< class_data * >(&s_cd);
00060 }
00061 };
00062
00064
00073 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
00074 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelper8
00075 : public com::sun::star::lang::XTypeProvider
00076 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8
00077 {
00078 struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, ImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {};
00079 public:
00080 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00081 { return ImplHelper_query( rType, cd::get(), this ); }
00082 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00083 { return ImplHelper_getTypes( cd::get() ); }
00084 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00085 { return ImplHelper_getImplementationId( cd::get() ); }
00086
00087 #if !defined _MSC_VER // public -> protected changes mangled names there
00088 protected:
00089 #endif
00090 ~ImplHelper8() throw () {}
00091 };
00100 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
00101 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakImplHelper8
00102 : public OWeakObject
00103 , public com::sun::star::lang::XTypeProvider
00104 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8
00105 {
00106 struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, WeakImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {};
00107 public:
00108 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00109 { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); }
00110 virtual void SAL_CALL acquire() throw ()
00111 { OWeakObject::acquire(); }
00112 virtual void SAL_CALL release() throw ()
00113 { OWeakObject::release(); }
00114 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00115 { return WeakImplHelper_getTypes( cd::get() ); }
00116 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00117 { return ImplHelper_getImplementationId( cd::get() ); }
00118 };
00132 template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
00133 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggImplHelper8
00134 : public OWeakAggObject
00135 , public com::sun::star::lang::XTypeProvider
00136 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8
00137 {
00138 struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, WeakAggImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {};
00139 public:
00140 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00141 { return OWeakAggObject::queryInterface( rType ); }
00142 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00143 { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); }
00144 virtual void SAL_CALL acquire() throw ()
00145 { OWeakAggObject::acquire(); }
00146 virtual void SAL_CALL release() throw ()
00147 { OWeakAggObject::release(); }
00148 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00149 { return WeakAggImplHelper_getTypes( cd::get() ); }
00150 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00151 { return ImplHelper_getImplementationId( cd::get() ); }
00152 };
00169 template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
00170 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplInheritanceHelper8
00171 : public BaseClass
00172 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8
00173 {
00174 struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, ImplInheritanceHelper8<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {};
00175 protected:
00176 template< typename T1 >
00177 explicit ImplInheritanceHelper8(T1 const & arg1): BaseClass(arg1) {}
00178 template< typename T1, typename T2 >
00179 ImplInheritanceHelper8(T1 const & arg1, T2 const & arg2):
00180 BaseClass(arg1, arg2) {}
00181 template< typename T1, typename T2, typename T3 >
00182 ImplInheritanceHelper8(
00183 T1 const & arg1, T2 const & arg2, T3 const & arg3):
00184 BaseClass(arg1, arg2, arg3) {}
00185 template< typename T1, typename T2, typename T3, typename T4 >
00186 ImplInheritanceHelper8(
00187 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
00188 BaseClass(arg1, arg2, arg3, arg4) {}
00189 template<
00190 typename T1, typename T2, typename T3, typename T4, typename T5 >
00191 ImplInheritanceHelper8(
00192 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00193 T5 const & arg5):
00194 BaseClass(arg1, arg2, arg3, arg4, arg5) {}
00195 template<
00196 typename T1, typename T2, typename T3, typename T4, typename T5,
00197 typename T6 >
00198 ImplInheritanceHelper8(
00199 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00200 T5 const & arg5, T6 const & arg6):
00201 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
00202 public:
00203 ImplInheritanceHelper8() {}
00204 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00205 {
00206 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
00207 if (aRet.hasValue())
00208 return aRet;
00209 return BaseClass::queryInterface( rType );
00210 }
00211 virtual void SAL_CALL acquire() throw ()
00212 { BaseClass::acquire(); }
00213 virtual void SAL_CALL release() throw ()
00214 { BaseClass::release(); }
00215 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00216 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
00217 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00218 { return ImplHelper_getImplementationId( cd::get() ); }
00219 };
00237 template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 >
00238 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE AggImplInheritanceHelper8
00239 : public BaseClass
00240 , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8
00241 {
00242 struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, AggImplInheritanceHelper8<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {};
00243 protected:
00244 template< typename T1 >
00245 explicit AggImplInheritanceHelper8(T1 const & arg1): BaseClass(arg1) {}
00246 template< typename T1, typename T2 >
00247 AggImplInheritanceHelper8(T1 const & arg1, T2 const & arg2):
00248 BaseClass(arg1, arg2) {}
00249 template< typename T1, typename T2, typename T3 >
00250 AggImplInheritanceHelper8(
00251 T1 const & arg1, T2 const & arg2, T3 const & arg3):
00252 BaseClass(arg1, arg2, arg3) {}
00253 template< typename T1, typename T2, typename T3, typename T4 >
00254 AggImplInheritanceHelper8(
00255 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4):
00256 BaseClass(arg1, arg2, arg3, arg4) {}
00257 template<
00258 typename T1, typename T2, typename T3, typename T4, typename T5 >
00259 AggImplInheritanceHelper8(
00260 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00261 T5 const & arg5):
00262 BaseClass(arg1, arg2, arg3, arg4, arg5) {}
00263 template<
00264 typename T1, typename T2, typename T3, typename T4, typename T5,
00265 typename T6 >
00266 AggImplInheritanceHelper8(
00267 T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4,
00268 T5 const & arg5, T6 const & arg6):
00269 BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {}
00270 public:
00271 AggImplInheritanceHelper8() {}
00272 virtual com::sun::star::uno::Any SAL_CALL queryInterface( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00273 { return BaseClass::queryInterface( rType ); }
00274 virtual com::sun::star::uno::Any SAL_CALL queryAggregation( com::sun::star::uno::Type const & rType ) throw (com::sun::star::uno::RuntimeException)
00275 {
00276 com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) );
00277 if (aRet.hasValue())
00278 return aRet;
00279 return BaseClass::queryAggregation( rType );
00280 }
00281 virtual void SAL_CALL acquire() throw ()
00282 { BaseClass::acquire(); }
00283 virtual void SAL_CALL release() throw ()
00284 { BaseClass::release(); }
00285 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() throw (com::sun::star::uno::RuntimeException)
00286 { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); }
00287 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (com::sun::star::uno::RuntimeException)
00288 { return ImplHelper_getImplementationId( cd::get() ); }
00289 };
00290 }
00291
00292 #endif
00293
00294