LibreOffice: cppuhelper/weakagg.hxx Source File

LibreOffice LibreOffice 26.2 SDK C/C++ API Reference

Loading...
Searching...
No Matches
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
20/*
21 * This file is part of LibreOffice published API.
22 */
23#ifndef INCLUDED_CPPUHELPER_WEAKAGG_HXX
24#define INCLUDED_CPPUHELPER_WEAKAGG_HXX
25
26#include "cppuhelper/weak.hxx"
27#include "cppuhelper/weakref.hxx"
28#include "com/sun/star/uno/XAggregation.hpp"
29#include "cppuhelper/cppuhelperdllapi.h"
30
31
32namespace cppu
33{
34
45 class CPPUHELPER_DLLPUBLIC OWeakAggObject
46 : public ::cppu::OWeakObject
47 , public css::uno::XAggregation
48{
49public:
52 OWeakAggObject()
53 {}
54
58 virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE;
62 virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE;
71 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) SAL_OVERRIDE;
72
77 virtual void SAL_CALL setDelegator( const css::uno::Reference< css::uno::XInterface > & Delegator ) SAL_OVERRIDE;
83 virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) SAL_OVERRIDE;
84
85protected:
92 virtual ~OWeakAggObject() SAL_OVERRIDE;
93
96 css::uno::WeakReferenceHelper xDelegator;
97private:
98 OWeakAggObject( const OWeakAggObject & rObj ) SAL_DELETED_FUNCTION;
99 OWeakAggObject & operator = ( const OWeakAggObject & rObj )
100 SAL_DELETED_FUNCTION;
101};
102
103}
104
105#endif
106
107/* 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
weak.hxx
weakref.hxx
cppuhelperdllapi.h
CPPUHELPER_DLLPUBLIC
#define CPPUHELPER_DLLPUBLIC
Definition cppuhelperdllapi.h:32
com::sun::star
Definition types.h:377
cppu
Definition Enterable.hxx:31
cppu::OWeakObject
Base class to implement a UNO object supporting weak references, i.e.
Definition weak.hxx:48
cppu::OWeakAggObject::acquire
virtual void acquire() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets acquired.
cppu::OWeakAggObject::queryAggregation
virtual css::uno::Any queryAggregation(const css::uno::Type &rType) SAL_OVERRIDE
Called by the delegator or queryInterface.
cppu::OWeakAggObject::xDelegator
css::uno::WeakReferenceHelper xDelegator
weak reference to delegator.
Definition weakagg.hxx:96
cppu::OWeakAggObject::OWeakAggObject
OWeakAggObject()
Constructor.
Definition weakagg.hxx:52
cppu::OWeakAggObject::setDelegator
virtual void setDelegator(const css::uno::Reference< css::uno::XInterface > &Delegator) SAL_OVERRIDE
Set the delegator.
cppu::OWeakAggObject::queryInterface
virtual css::uno::Any queryInterface(const css::uno::Type &rType) SAL_OVERRIDE
If a delegator is set, then the delegator is queried for the demanded interface.
cppu::OWeakAggObject::release
virtual void release() SAL_NOEXCEPT SAL_OVERRIDE
If a delegator is set, then the delegators gets released.