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