LibreOffice
LibreOffice 5.3 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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>
24 
25 #include <cppuhelper/implbase1.hxx>
26 
27 #include <com/sun/star/lang/XComponent.hpp>
28 
30 
31 namespace osl { class Mutex; }
32 
33 namespace cppu
34 {
35 
46  : public ::cppu::OWeakAggObject
47  , public css::lang::XTypeProvider
48  , public css::lang::XComponent
49 {
50 public:
57  OComponentHelper( ::osl::Mutex & rMutex );
60  virtual ~OComponentHelper() SAL_OVERRIDE;
61 
62  // XAggregation
63  virtual css::uno::Any SAL_CALL queryInterface(
64  css::uno::Type const & rType )
65  throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
66  virtual css::uno::Any SAL_CALL queryAggregation(
67  css::uno::Type const & rType )
68  throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69  virtual void SAL_CALL acquire()
70  throw () SAL_OVERRIDE;
71  virtual void SAL_CALL release()
72  throw () SAL_OVERRIDE;
73 
77  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
78  throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
82  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
83  throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
84 
85  // XComponent
86  virtual void SAL_CALL dispose()
87  throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
88  virtual void SAL_CALL addEventListener(
89  const css::uno::Reference< css::lang::XEventListener >& aListener )
90  throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
91  virtual void SAL_CALL removeEventListener(
92  const css::uno::Reference< css::lang::XEventListener >& aListener )
93  throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
94 
95 protected:
98  virtual void SAL_CALL disposing();
99 
101  OBroadcastHelper rBHelper;
103 
104 private:
106  OComponentHelper & operator = ( const OComponentHelper & )
108 };
109 
110 }
111 
112 #endif
113 
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
A mutual exclusion synchronization object.
Definition: mutex.hxx:30
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:410
css::uno::Any queryInterface(const css::uno::Type &rType, Interface1 *p1)
Compares demanded type to given template argument types.
Definition: queryinterface.hxx:39
#define SAL_OVERRIDE
C++11 &quot;override&quot; feature.
Definition: types.h:423
Base class to implement an UNO object supporting weak references, i.e.
Definition: weakagg.hxx:41
Deprecated.
Definition: component.hxx:45
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:28
This struct contains the standard variables of a broadcaster.
Definition: interfacecontainer.h:435