LibreOffice: cppuhelper/component.hxx Source File

LibreOffice LibreOffice 7.1 SDK C/C++ API Reference

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#ifndef INCLUDED_CPPUHELPER_COMPONENT_HXX
20#define INCLUDED_CPPUHELPER_COMPONENT_HXX
21
22#include "cppuhelper/weakagg.hxx"
23#include "cppuhelper/interfacecontainer.h"
24
25#include "com/sun/star/lang/XComponent.hpp"
26#include "com/sun/star/lang/XTypeProvider.hpp"
27
28#include "cppuhelper/cppuhelperdllapi.h"
29
30 namespace osl { class Mutex; }
31
32namespace cppu
33{
34
44 class CPPUHELPER_DLLPUBLIC OComponentHelper
45 : public ::cppu::OWeakAggObject
46 , public css::lang::XTypeProvider
47 , public css::lang::XComponent
48{
49public:
56 OComponentHelper( ::osl::Mutex & rMutex );
59 virtual ~OComponentHelper() SAL_OVERRIDE;
60
61 // XAggregation
62 virtual css::uno::Any SAL_CALL queryInterface(
63 css::uno::Type const & rType ) SAL_OVERRIDE;
64 virtual css::uno::Any SAL_CALL queryAggregation(
65 css::uno::Type const & rType ) SAL_OVERRIDE;
66 virtual void SAL_CALL acquire()
67 throw () SAL_OVERRIDE;
68 virtual void SAL_CALL release()
69 throw () SAL_OVERRIDE;
70
74 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE = 0;
78 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE;
79
80 // XComponent
81 virtual void SAL_CALL dispose() SAL_OVERRIDE;
82 virtual void SAL_CALL addEventListener(
83 const css::uno::Reference< css::lang::XEventListener >& aListener ) SAL_OVERRIDE;
84 virtual void SAL_CALL removeEventListener(
85 const css::uno::Reference< css::lang::XEventListener >& aListener ) SAL_OVERRIDE;
86
87protected:
90 virtual void SAL_CALL disposing();
91
93 OBroadcastHelper rBHelper;
95
96private:
97 OComponentHelper( const OComponentHelper & ) SAL_DELETED_FUNCTION;
98 OComponentHelper & operator = ( const OComponentHelper & )
99 SAL_DELETED_FUNCTION;
100};
101
102}
103
104#endif
105
106/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DELETED_FUNCTION
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:374
SAL_OVERRIDE
#define SAL_OVERRIDE
C++11 "override" feature.
Definition: types.h:387
sal_Int8
signed char sal_Int8
Definition: types.h:39
interfacecontainer.h
weakagg.hxx
cppuhelperdllapi.h
CPPUHELPER_DLLPUBLIC
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:28
cppu
Definition: Enterable.hxx:27
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
com::sun::star
Definition: unotype.hxx:35
osl
Definition: component.hxx:30
cppu::OComponentHelper
Deprecated.
Definition: component.hxx:48
cppu::OComponentHelper::OComponentHelper
OComponentHelper(::osl::Mutex &rMutex)
Constructor.
cppu::OComponentHelper::~OComponentHelper
virtual ~OComponentHelper() SAL_OVERRIDE
Destructor.
cppu::OBroadcastHelperVar
This struct contains the standard variables of a broadcaster.
Definition: interfacecontainer.h:437
cppu::OWeakAggObject
Base class to implement a UNO object supporting weak references, i.e.
Definition: weakagg.hxx:44
osl::Mutex
A mutual exclusion synchronization object.
Definition: mutex.hxx:31