LibreOffice LibreOffice 4.3 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
weakagg.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_WEAKAGG_HXX
20 #define INCLUDED_CPPUHELPER_WEAKAGG_HXX
21
22 #include <cppuhelper/weak.hxx>
23 #include <com/sun/star/uno/XAggregation.hpp>
24 #include <cppuhelper/cppuhelperdllapi.h>
25
26
27 namespace cppu
28 {
29
40 class CPPUHELPER_DLLPUBLIC OWeakAggObject
41 : public ::cppu::OWeakObject
42 , public ::com::sun::star::uno::XAggregation
43 {
44 public:
47 inline OWeakAggObject() SAL_THROW(())
48 {}
49
53 virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
57 virtual void SAL_CALL release() throw() SAL_OVERRIDE;
66 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType )
67 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
68
73 virtual void SAL_CALL setDelegator( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Delegator )
74 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType )
81 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
82
83 protected:
90 virtual ~OWeakAggObject() SAL_THROW( (::com::sun::star::uno::RuntimeException) );
91
94 ::com::sun::star::uno::WeakReferenceHelper xDelegator;
95 private:
96 OWeakAggObject( const OWeakAggObject & rObj ) SAL_THROW(());
97 OWeakAggObject & operator = ( const OWeakAggObject & rObj ) SAL_THROW(());
98 };
99
100 }
101
102 #endif
103
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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::OWeakAggObject
Base class to implement an UNO object supporting weak references, i.e.
Definition: weakagg.hxx:40
SAL_OVERRIDE
#define SAL_OVERRIDE
C++11 "override" feature.
Definition: types.h:423
cppu
Definition: Enterable.hxx:26
SAL_THROW
#define SAL_THROW(x)
Exception specification documentation.
Definition: types.h:361
cppu::OWeakObject
Base class to implement an UNO object supporting weak references, i.e.
Definition: weak.hxx:43
CPPUHELPER_DLLPUBLIC
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:28
cppu::OWeakAggObject::OWeakAggObject
OWeakAggObject() SAL_THROW(())
Constructor.
Definition: weakagg.hxx:47
cppuhelperdllapi.h
com
Definition: types.h:391
weak.hxx