LibreOffice
LibreOffice 26.2 SDK C/C++ API Reference
Toggle main menu visibility
Loading...
Searching...
No Matches
component.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_COMPONENT_HXX
24
#define INCLUDED_CPPUHELPER_COMPONENT_HXX
25
26
#include "
cppuhelper/weakagg.hxx
"
27
#include "
cppuhelper/interfacecontainer.h
"
28
29
#include "com/sun/star/lang/XComponent.hpp"
30
#include "com/sun/star/lang/XTypeProvider.hpp"
31
32
#include "
cppuhelper/cppuhelperdllapi.h
"
33
34
namespace
osl
{
class
Mutex
; }
35
36
namespace
cppu
37
{
38
48
class
CPPUHELPER_DLLPUBLIC
OComponentHelper
49
:
public
::cppu::OWeakAggObject
50
,
public
css::lang::XTypeProvider
51
,
public
css::lang::XComponent
52
{
53
public
:
60
OComponentHelper
(
::osl::Mutex
& rMutex );
63
virtual
~OComponentHelper
()
SAL_OVERRIDE
;
64
65
// XAggregation
66
virtual
css
::uno::Any SAL_CALL
queryInterface
(
67
css
::uno::Type const & rType )
SAL_OVERRIDE
;
68
virtual
css
::uno::Any SAL_CALL
queryAggregation
(
69
css
::uno::Type const & rType )
SAL_OVERRIDE
;
70
virtual
void
SAL_CALL
acquire
()
71
SAL_NOEXCEPT
SAL_OVERRIDE
;
72
virtual
void
SAL_CALL
release
()
73
SAL_NOEXCEPT
SAL_OVERRIDE
;
74
78
virtual
css
::uno::Sequence<
sal_Int8
> SAL_CALL
getImplementationId
()
SAL_OVERRIDE
= 0;
82
virtual
css
::uno::Sequence<
css
::uno::Type > SAL_CALL
getTypes
()
SAL_OVERRIDE
;
83
84
// XComponent
85
virtual
void
SAL_CALL
dispose
()
SAL_OVERRIDE
;
86
virtual
void
SAL_CALL
addEventListener
(
87
const
css
::uno::Reference<
css
::lang::XEventListener >& aListener )
SAL_OVERRIDE
;
88
virtual
void
SAL_CALL
removeEventListener
(
89
const
css
::uno::Reference<
css
::lang::XEventListener >& aListener )
SAL_OVERRIDE
;
90
91
protected:
94
virtual
void
SAL_CALL
disposing
();
95
97
OBroadcastHelper
m_rBHelper;
99
100
private:
101
OComponentHelper
( const
OComponentHelper
& )
SAL_DELETED_FUNCTION
;
102
OComponentHelper
& operator = ( const
OComponentHelper
& )
103
SAL_DELETED_FUNCTION
;
104
};
105
106
}
107
108
#endif
109
110
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_NOEXCEPT
#define SAL_NOEXCEPT
Macro for C++11 "noexcept" vs.
Definition
types.h:434
SAL_DELETED_FUNCTION
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition
types.h:396
SAL_OVERRIDE
#define SAL_OVERRIDE
C++11 "override" feature.
Definition
types.h:409
sal_Int8
signed char sal_Int8
Definition
types.h:43
weakagg.hxx
interfacecontainer.h
cppuhelperdllapi.h
CPPUHELPER_DLLPUBLIC
#define CPPUHELPER_DLLPUBLIC
Definition
cppuhelperdllapi.h:32
com::sun::star
Definition
types.h:377
osl
Definition
condition.hxx:31
cppu
Definition
Enterable.hxx:31
cppu::OBroadcastHelper
OBroadcastHelperVar< OMultiTypeInterfaceContainerHelper, OMultiTypeInterfaceContainerHelper::keyType > OBroadcastHelper
Definition
interfacecontainer.h:608
osl::Mutex
A mutual exclusion synchronization object.
Definition
mutex.hxx:35
cppu::OComponentHelper::queryInterface
virtual css::uno::Any queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
If a delegator is set, then the delegator is queried for the demanded interface.
cppu::OComponentHelper::acquire
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets acquired.
cppu::OComponentHelper::dispose
virtual void dispose() SAL_OVERRIDE
cppu::OComponentHelper::queryAggregation
virtual css::uno::Any queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
Called by the delegator or queryInterface.
cppu::OComponentHelper::addEventListener
virtual void addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) SAL_OVERRIDE
cppu::OComponentHelper::release
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets released.
cppu::OComponentHelper::OComponentHelper
OComponentHelper(::osl::Mutex &rMutex)
Constructor.
cppu::OComponentHelper::disposing
virtual void disposing()
Called in dispose method after the listeners were notified.
cppu::OComponentHelper::getTypes
virtual css::uno::Sequence< css::uno::Type > getTypes() SAL_OVERRIDE
cppu::OComponentHelper::getImplementationId
virtual css::uno::Sequence< sal_Int8 > getImplementationId() SAL_OVERRIDE=0
cppu::OComponentHelper::removeEventListener
virtual void removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) SAL_OVERRIDE
cppu::OComponentHelper::~OComponentHelper
virtual ~OComponentHelper() SAL_OVERRIDE
Destructor.
cppu::OWeakAggObject
Base class to implement a UNO object supporting weak references, i.e.
Definition
weakagg.hxx:48
cppuhelper
component.hxx
Generated by
1.17.0