LibreOffice LibreOffice 4.1 SDK C/C++ API Reference

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

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 _CPPUHELPER_COMPONENT_HXX_
20 #define _CPPUHELPER_COMPONENT_HXX_
21
22 #include <osl/mutex.hxx>
23 #include <cppuhelper/weakagg.hxx>
24 #include <cppuhelper/interfacecontainer.hxx>
25
26 #include <cppuhelper/implbase1.hxx>
27
28 #include <com/sun/star/lang/XComponent.hpp>
29 #include <com/sun/star/lang/XEventListener.hpp>
30
31 #include "cppuhelperdllapi.h"
32
33 namespace cppu
34 {
35
45 class CPPUHELPER_DLLPUBLIC OComponentHelper
46 : public ::cppu::OWeakAggObject
47 , public ::com::sun::star::lang::XTypeProvider
48 , public ::com::sun::star::lang::XComponent
49 {
50 public:
57 OComponentHelper( ::osl::Mutex & rMutex ) SAL_THROW(());
60 virtual ~OComponentHelper() SAL_THROW( (::com::sun::star::uno::RuntimeException) );
61
62 // XAggregation
63 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
64 ::com::sun::star::uno::Type const & rType )
65 throw (::com::sun::star::uno::RuntimeException);
66 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(
67 ::com::sun::star::uno::Type const & rType )
68 throw (::com::sun::star::uno::RuntimeException);
69 virtual void SAL_CALL acquire()
70 throw ();
71 virtual void SAL_CALL release()
72 throw ();
73
77 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
78 throw(::com::sun::star::uno::RuntimeException) = 0;
82 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
83 throw (::com::sun::star::uno::RuntimeException);
84
85 // XComponent
86 virtual void SAL_CALL dispose()
87 throw(::com::sun::star::uno::RuntimeException);
88 virtual void SAL_CALL addEventListener(
89 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener )
90 throw(::com::sun::star::uno::RuntimeException);
91 virtual void SAL_CALL removeEventListener(
92 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener )
93 throw(::com::sun::star::uno::RuntimeException);
94
95 protected:
98 virtual void SAL_CALL disposing();
99
101 OBroadcastHelper rBHelper;
103
104 private:
105 inline OComponentHelper( const OComponentHelper & ) SAL_THROW(());
106 inline OComponentHelper & operator = ( const OComponentHelper & ) SAL_THROW(());
107 };
108
109 }
110
111 #endif
112
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cppu::OComponentHelper
Deprecated.
Definition: component.hxx:45
osl::Mutex
A mutual exclusion synchronization object.
Definition: mutex.hxx:32
mutex.hxx
cppu::queryInterface
inline::com::sun::star::uno::Any queryInterface(const ::com::sun::star::uno::Type &rType, Interface1 *p1)
Compares demanded type to given template argument types.
Definition: queryinterface.hxx:39
cppu::OBroadcastHelperVar
This struct contains the standard variables of a broadcaster.
Definition: interfacecontainer.h:427
CPPUHELPER_DLLPUBLIC
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:28
interfacecontainer.hxx
cppuhelperdllapi.h
weakagg.hxx
implbase1.hxx
cppu::OWeakAggObject
Base class to implement an UNO object supporting weak references, i.e.
Definition: weakagg.hxx:40
SAL_THROW
#define SAL_THROW(exc)
Definition of function throw clause macros.
Definition: types.h:356
com::sun::star::uno::Type
C++ class representing an IDL meta type.
Definition: Type.h:55