LibreOffice: cppuhelper/compbase3.hxx Source File

LibreOffice LibreOffice 7.0 SDK C/C++ API Reference

compbase3.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19 #ifndef INCLUDED_CPPUHELPER_COMPBASE3_HXX
20 #define INCLUDED_CPPUHELPER_COMPBASE3_HXX
21
22 #include "cppuhelper/implbase3.hxx"
23 #include "cppuhelper/compbase_ex.hxx"
24
25 namespace cppu
26 {
27
42 template< class Ifc1, class Ifc2, class Ifc3 >
43 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakComponentImplHelper3
44 : public WeakComponentImplHelperBase
45 , public css::lang::XTypeProvider
46 , public Ifc1, public Ifc2, public Ifc3
47 {
48 struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, WeakComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
49 public:
50 WeakComponentImplHelper3( ::osl::Mutex & rMutex ) throw ()
51 : WeakComponentImplHelperBase( rMutex )
52 {}
53 virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
54 { return WeakComponentImplHelper_query( rType, cd::get(), this, static_cast<WeakComponentImplHelperBase *>(this) ); }
55 virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
56 { WeakComponentImplHelperBase::acquire(); }
57 virtual void SAL_CALL release() throw () SAL_OVERRIDE
58 { WeakComponentImplHelperBase::release(); }
59 virtual void SAL_CALL dispose() SAL_OVERRIDE
60 { WeakComponentImplHelperBase::dispose(); }
61 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & xListener) SAL_OVERRIDE
62 { WeakComponentImplHelperBase::addEventListener(xListener); }
63 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & xListener) SAL_OVERRIDE
64 { WeakComponentImplHelperBase::removeEventListener(xListener); }
65 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
66 { return WeakComponentImplHelper_getTypes( cd::get() ); }
67 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
68 { return ImplHelper_getImplementationId( cd::get() ); }
69 };
70
80 template< class Ifc1, class Ifc2, class Ifc3 >
81 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE PartialWeakComponentImplHelper3
82 : public WeakComponentImplHelperBase
83 , public css::lang::XTypeProvider
84 , public Ifc1, public Ifc2, public Ifc3
85 {
86 struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, PartialWeakComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
87 public:
88 PartialWeakComponentImplHelper3( ::osl::Mutex & rMutex ) throw ()
89 : WeakComponentImplHelperBase( rMutex )
90 {}
91 virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
92 { return WeakComponentImplHelper_query( rType, cd::get(), this, static_cast<WeakComponentImplHelperBase *>(this) ); }
93 virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
94 { WeakComponentImplHelperBase::acquire(); }
95 virtual void SAL_CALL release() throw () SAL_OVERRIDE
96 { WeakComponentImplHelperBase::release(); }
97 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
98 { return WeakComponentImplHelper_getTypes( cd::get() ); }
99 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
100 { return ImplHelper_getImplementationId( cd::get() ); }
101 };
102
120 template< class Ifc1, class Ifc2, class Ifc3 >
121 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggComponentImplHelper3
122 : public WeakAggComponentImplHelperBase
123 , public css::lang::XTypeProvider
124 , public Ifc1, public Ifc2, public Ifc3
125 {
126 struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, WeakAggComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {};
127 public:
128 WeakAggComponentImplHelper3( ::osl::Mutex & rMutex ) throw ()
129 : WeakAggComponentImplHelperBase( rMutex )
130 {}
131 virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
132 { return WeakAggComponentImplHelperBase::queryInterface( rType ); }
133 virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) SAL_OVERRIDE
134 { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, static_cast<WeakAggComponentImplHelperBase *>(this) ); }
135 virtual void SAL_CALL acquire() throw () SAL_OVERRIDE
136 { WeakAggComponentImplHelperBase::acquire(); }
137 virtual void SAL_CALL release() throw () SAL_OVERRIDE
138 { WeakAggComponentImplHelperBase::release(); }
139 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
140 { return WeakAggComponentImplHelper_getTypes( cd::get() ); }
141 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
142 { return ImplHelper_getImplementationId( cd::get() ); }
143 };
144 }
145
146 #endif
147
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cppu::WeakAggComponentImplHelper3::queryInterface
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: compbase3.hxx:131
compbase_ex.hxx
cppu::WeakAggComponentImplHelper3::WeakAggComponentImplHelper3
WeakAggComponentImplHelper3(::osl::Mutex &rMutex)
Definition: compbase3.hxx:128
cppu
Definition: Enterable.hxx:27
cppu::WeakComponentImplHelper3
Implementation helper supporting css::lang::XTypeProvider and css::lang::XComponent.
Definition: compbase3.hxx:47
cppu::WeakComponentImplHelper3::WeakComponentImplHelper3
WeakComponentImplHelper3(::osl::Mutex &rMutex)
Definition: compbase3.hxx:50
cppu::PartialWeakComponentImplHelper3::queryInterface
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: compbase3.hxx:91
cppu::PartialWeakComponentImplHelper3::release
virtual void release() SAL_OVERRIDE
Definition: compbase3.hxx:95
cppu::WeakComponentImplHelper3::addEventListener
virtual void addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) SAL_OVERRIDE
Definition: compbase3.hxx:61
cppu::WeakComponentImplHelper3::release
virtual void release() SAL_OVERRIDE
Definition: compbase3.hxx:57
cppu::WeakComponentImplHelper3::getImplementationId
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: compbase3.hxx:67
cppu::WeakComponentImplHelper3::removeEventListener
virtual void removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) SAL_OVERRIDE
Definition: compbase3.hxx:63
rtl::StaticAggregate
Helper class for a late-initialized static aggregate, e.g.
Definition: instance.hxx:544
implbase3.hxx
cppu::WeakAggComponentImplHelper3::release
virtual void release() SAL_OVERRIDE
Definition: compbase3.hxx:137
osl::Mutex
A mutual exclusion synchronization object.
Definition: mutex.hxx:31
cppu::PartialWeakComponentImplHelper3::acquire
virtual void acquire() SAL_OVERRIDE
Definition: compbase3.hxx:93
cppu::WeakAggComponentImplHelper3::queryAggregation
virtual css::uno::Any queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
Definition: compbase3.hxx:133
cppu::WeakComponentImplHelper3::getTypes
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: compbase3.hxx:65
SAL_NO_VTABLE
#define SAL_NO_VTABLE
Use this for pure virtual classes, e.g.
Definition: types.h:308
cppu::WeakComponentImplHelper3::dispose
virtual void dispose() SAL_OVERRIDE
Definition: compbase3.hxx:59
cppu::PartialWeakComponentImplHelper3::getTypes
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: compbase3.hxx:97
cppu::WeakComponentImplHelper3::acquire
virtual void acquire() SAL_OVERRIDE
Definition: compbase3.hxx:55
cppu::WeakAggComponentImplHelper3
Implementation helper supporting css::lang::XTypeProvider and css::lang::XComponent.
Definition: compbase3.hxx:125
cppu::WeakComponentImplHelper3::queryInterface
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition: compbase3.hxx:53
cppu::PartialWeakComponentImplHelper3::PartialWeakComponentImplHelper3
PartialWeakComponentImplHelper3(::osl::Mutex &rMutex)
Definition: compbase3.hxx:88
SAL_OVERRIDE
#define SAL_OVERRIDE
C++11 "override" feature.
Definition: types.h:405
cppu::PartialWeakComponentImplHelper3
Same as WeakComponentImplHelper3, except doesn't implement addEventListener, removeEventListener and ...
Definition: compbase3.hxx:85
cppu::WeakAggComponentImplHelper3::getTypes
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition: compbase3.hxx:139
cppu::WeakAggComponentImplHelper3::getImplementationId
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: compbase3.hxx:141
cppu::queryInterface
css::uno::Any queryInterface(const css::uno::Type &rType, Interface1 *p1)
Compares demanded type to given template argument types.
Definition: queryinterface.hxx:39
cppu::WeakAggComponentImplHelper3::acquire
virtual void acquire() SAL_OVERRIDE
Definition: compbase3.hxx:135
cppu::PartialWeakComponentImplHelper3::getImplementationId
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition: compbase3.hxx:99