LibreOffice: cppuhelper/compbase2.hxx Source File

LibreOffice LibreOffice 7.5 SDK C/C++ API Reference

Loading...
Searching...
No Matches
compbase2.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
20/*
21 * This file is part of LibreOffice published API.
22 */
23#ifndef INCLUDED_CPPUHELPER_COMPBASE2_HXX
24#define INCLUDED_CPPUHELPER_COMPBASE2_HXX
25
26#include "cppuhelper/implbase2.hxx"
27#include "cppuhelper/compbase_ex.hxx"
28
29namespace cppu
30{
31
46 template< class Ifc1, class Ifc2 >
47 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakComponentImplHelper2
48 : public WeakComponentImplHelperBase
49 , public css::lang::XTypeProvider
50 , public Ifc1, public Ifc2
51 {
52 struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakComponentImplHelper2<Ifc1, Ifc2> > > {};
53 public:
54 WeakComponentImplHelper2( ::osl::Mutex & rMutex ) SAL_NOEXCEPT
55 : WeakComponentImplHelperBase( rMutex )
56 {}
57 virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
58 { return WeakComponentImplHelper_query( rType, cd::get(), this, static_cast<WeakComponentImplHelperBase *>(this) ); }
59 virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
60 { WeakComponentImplHelperBase::acquire(); }
61 virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
62 { WeakComponentImplHelperBase::release(); }
63 virtual void SAL_CALL dispose() SAL_OVERRIDE
64 { WeakComponentImplHelperBase::dispose(); }
65 virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & xListener) SAL_OVERRIDE
66 { WeakComponentImplHelperBase::addEventListener(xListener); }
67 virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & xListener) SAL_OVERRIDE
68 { WeakComponentImplHelperBase::removeEventListener(xListener); }
69 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
70 { return WeakComponentImplHelper_getTypes( cd::get() ); }
71 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
72 { return ImplHelper_getImplementationId( cd::get() ); }
73 };
74
84 template< class Ifc1, class Ifc2 >
85 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE PartialWeakComponentImplHelper2
86 : public WeakComponentImplHelperBase
87 , public css::lang::XTypeProvider
88 , public Ifc1, public Ifc2
89 {
90 struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, PartialWeakComponentImplHelper2<Ifc1, Ifc2> > > {};
91 public:
92 PartialWeakComponentImplHelper2( ::osl::Mutex & rMutex ) SAL_NOEXCEPT
93 : WeakComponentImplHelperBase( rMutex )
94 {}
95 virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
96 { return WeakComponentImplHelper_query( rType, cd::get(), this, static_cast<WeakComponentImplHelperBase *>(this) ); }
97 virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
98 { WeakComponentImplHelperBase::acquire(); }
99 virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
100 { WeakComponentImplHelperBase::release(); }
101 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
102 { return WeakComponentImplHelper_getTypes( cd::get() ); }
103 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
104 { return ImplHelper_getImplementationId( cd::get() ); }
105 };
106
107
125 template< class Ifc1, class Ifc2 >
126 class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakAggComponentImplHelper2
127 : public WeakAggComponentImplHelperBase
128 , public css::lang::XTypeProvider
129 , public Ifc1, public Ifc2
130 {
131 struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakAggComponentImplHelper2<Ifc1, Ifc2> > > {};
132 public:
133 WeakAggComponentImplHelper2( ::osl::Mutex & rMutex ) SAL_NOEXCEPT
134 : WeakAggComponentImplHelperBase( rMutex )
135 {}
136 virtual css::uno::Any SAL_CALL queryInterface( css::uno::Type const & rType ) SAL_OVERRIDE
137 { return WeakAggComponentImplHelperBase::queryInterface( rType ); }
138 virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) SAL_OVERRIDE
139 { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, static_cast<WeakAggComponentImplHelperBase *>(this) ); }
140 virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
141 { WeakAggComponentImplHelperBase::acquire(); }
142 virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
143 { WeakAggComponentImplHelperBase::release(); }
144 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
145 { return WeakAggComponentImplHelper_getTypes( cd::get() ); }
146 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
147 { return ImplHelper_getImplementationId( cd::get() ); }
148 };
149}
150
151#endif
152
153/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_NOEXCEPT
#define SAL_NOEXCEPT
Macro for C++11 "noexcept" vs.
Definition types.h:416
SAL_NO_VTABLE
#define SAL_NO_VTABLE
Use this for pure virtual classes, e.g.
Definition types.h:294
SAL_OVERRIDE
#define SAL_OVERRIDE
C++11 "override" feature.
Definition types.h:391
implbase2.hxx
compbase_ex.hxx
cppu
Definition Enterable.hxx:31
osl::Mutex
A mutual exclusion synchronization object.
Definition mutex.hxx:35
cppu::WeakComponentImplHelper2
Implementation helper supporting css::lang::XTypeProvider and css::lang::XComponent.
Definition compbase2.hxx:51
cppu::WeakComponentImplHelper2::getTypes
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition compbase2.hxx:69
cppu::WeakComponentImplHelper2::addEventListener
virtual void addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) SAL_OVERRIDE
Definition compbase2.hxx:65
cppu::WeakComponentImplHelper2::removeEventListener
virtual void removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) SAL_OVERRIDE
Definition compbase2.hxx:67
cppu::WeakComponentImplHelper2::acquire
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
Definition compbase2.hxx:59
cppu::WeakComponentImplHelper2::getImplementationId
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition compbase2.hxx:71
cppu::WeakComponentImplHelper2::dispose
virtual void dispose() SAL_OVERRIDE
Definition compbase2.hxx:63
cppu::WeakComponentImplHelper2::queryInterface
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition compbase2.hxx:57
cppu::WeakComponentImplHelper2::release
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
Definition compbase2.hxx:61
cppu::WeakComponentImplHelper2::WeakComponentImplHelper2
WeakComponentImplHelper2(::osl::Mutex &rMutex) SAL_NOEXCEPT
Definition compbase2.hxx:54
cppu::PartialWeakComponentImplHelper2
Same as WeakComponentImplHelper2, except doesn't implement addEventListener, removeEventListener and ...
Definition compbase2.hxx:89
cppu::PartialWeakComponentImplHelper2::release
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
Definition compbase2.hxx:99
cppu::PartialWeakComponentImplHelper2::queryInterface
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition compbase2.hxx:95
cppu::PartialWeakComponentImplHelper2::PartialWeakComponentImplHelper2
PartialWeakComponentImplHelper2(::osl::Mutex &rMutex) SAL_NOEXCEPT
Definition compbase2.hxx:92
cppu::PartialWeakComponentImplHelper2::getImplementationId
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition compbase2.hxx:103
cppu::PartialWeakComponentImplHelper2::getTypes
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition compbase2.hxx:101
cppu::PartialWeakComponentImplHelper2::acquire
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
Definition compbase2.hxx:97
cppu::WeakAggComponentImplHelper2
Implementation helper supporting css::lang::XTypeProvider and css::lang::XComponent.
Definition compbase2.hxx:130
cppu::WeakAggComponentImplHelper2::getTypes
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
Definition compbase2.hxx:144
cppu::WeakAggComponentImplHelper2::WeakAggComponentImplHelper2
WeakAggComponentImplHelper2(::osl::Mutex &rMutex) SAL_NOEXCEPT
Definition compbase2.hxx:133
cppu::WeakAggComponentImplHelper2::queryAggregation
virtual css::uno::Any queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
Definition compbase2.hxx:138
cppu::WeakAggComponentImplHelper2::acquire
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
Definition compbase2.hxx:140
cppu::WeakAggComponentImplHelper2::release
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
Definition compbase2.hxx:142
cppu::WeakAggComponentImplHelper2::getImplementationId
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE
Definition compbase2.hxx:146
cppu::WeakAggComponentImplHelper2::queryInterface
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
Definition compbase2.hxx:136