/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_CPPUHELPER_WEAKAGG_HXX #define INCLUDED_CPPUHELPER_WEAKAGG_HXX #include #include #include #include namespace cppu { /** Base class to implement an UNO object supporting weak references, i.e. the object can be held weakly (by a css::uno::WeakReference) and aggregation, i.e. the object can be aggregated by another (delegator). This implementation copes with reference counting. Upon last release(), the virtual dtor is called. @derive Inherit from this class and delegate acquire()/ release() calls. Re-implement XAggregation::queryInterface(). */ class CPPUHELPER_DLLPUBLIC OWeakAggObject : public ::cppu::OWeakObject , public css::uno::XAggregation { public: /** Constructor. No delegator set. */ OWeakAggObject() {} /** If a delegator is set, then the delegators gets acquired. Otherwise call is delegated to base class ::cppu::OWeakObject. */ virtual void SAL_CALL acquire() throw() SAL_OVERRIDE; /** If a delegator is set, then the delegators gets released. Otherwise call is delegated to base class ::cppu::OWeakObject. */ virtual void SAL_CALL release() throw() SAL_OVERRIDE; /** If a delegator is set, then the delegator is queried for the demanded interface. If the delegator cannot provide the demanded interface, it calls queryAggregation() on its aggregated objects. @param rType demanded interface type @return demanded type or empty any @see queryAggregation. */ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) SAL_OVERRIDE; /** Set the delegator. The delegator member reference is a weak reference. @param Delegator the object that delegate its queryInterface to this aggregate. */ virtual void SAL_CALL setDelegator( const css::uno::Reference< css::uno::XInterface > & Delegator ) SAL_OVERRIDE; /** Called by the delegator or queryInterface. Re-implement this method instead of queryInterface. @see queryInterface */ virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) SAL_OVERRIDE; protected: /** Virtual dtor. Called when reference count is 0. @attention Despite the fact that a RuntimeException is allowed to be thrown, you must not throw any exception upon destruction! */ virtual ~OWeakAggObject() SAL_OVERRIDE; /** weak reference to delegator. */ css::uno::WeakReferenceHelper xDelegator; private: OWeakAggObject( const OWeakAggObject & rObj ) SAL_DELETED_FUNCTION; OWeakAggObject & operator = ( const OWeakAggObject & rObj ) SAL_DELETED_FUNCTION; }; } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ption value='distro/collabora/cp-5.0'>distro/collabora/cp-5.0 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2021-01-20Build compilerplugings code with -fvisibility-inlines-hiddenStephan Bergmann
2020-03-09Add --disable-compiler-plugins-analyzer-pch for Jenkins/linux_clang_dbgutil_64Stephan Bergmann
2020-02-17Fix typoAndrea Gelmini
2020-02-14Prevent -Werror,-Wunknown-warning-option when building compilerpluginsStephan Bergmann
2020-02-10sort compilerplugin sourcesLuboš Luňák
2019-11-25use -Xclang -fno-pch-timestamp also for Clang PCH in compilerpluginsLuboš Luňák
2019-10-21Don't invoke the linker when generating pch filesStephan Bergmann
2019-10-18Properly handle comma in CLANGFLAGSStephan Bergmann
2019-10-15use PCH for clang plugin source too, if enabledLuboš Luňák
2019-10-09fix compilerplugins makefile typoLuboš Luňák
2019-10-08My Windows clang-cl build still doesn't use LO_CLANG_SHARED_PLUGINSStephan Bergmann
2019-10-08More generated files to take care ofStephan Bergmann
2019-10-07try to autodetect flags needed to build Clang pluginsLuboš Luňák
2019-10-07generate make dependencies also for clang.pchLuboš Luňák
2019-10-06the PCH in compilerplugins should also depend on the MakefileLuboš Luňák
2019-09-20rebuild sharedvisitor.cxx if any of its sources disappearsLuboš Luňák
2019-09-17Fix compilerplugins for macOS againStephan Bergmann
2019-09-11Adapt compilerplugins.cleanStephan Bergmann
2019-09-06make clangplugin analyzer use internally a PCH to speed things upLuboš Luňák
2019-09-06split clangplugins sharedvisitor generator into two stepsLuboš Luňák
2019-08-30adapt to runToolOnCodeWithArgs API change in clang 10Noel Grandin
2019-08-15LLVM trunk requires C++14 nowStephan Bergmann
2019-07-16macOS ld doesn't know --rpathStephan Bergmann
2019-06-25help compilerplugins generator find clang shared libs, if neededLuboš Luňák
2019-06-25do not use -g unconditionally for building the clang pluginLuboš Luňák
2019-05-27fix compilerplugin rebuilding when system clang changesLuboš Luňák
2019-05-27sharedvisitor generator should also be rebuilt if clang changesLuboš Luňák
2019-05-23Avoid putting generator.dwo in current working dirStephan Bergmann
2019-05-20use -gsplit-dwarf also for compilerplugins if possibleLuboš Luňák
2019-03-27Disable LO_CLANG_SHARED_PLUGINS on Windows for nowStephan Bergmann
2019-03-23Consistently make generator invocation $(QUIET) tooStephan Bergmann
2019-03-22Allow to pass additional options into generator's clang::toolingStephan Bergmann
2019-03-18It is building the generator exe that depends on $(CLANGOUTDIR)/sharedvisitorStephan Bergmann
2019-03-12make (some) clang plugins share the same RecursiveASTVisitorLuboš Luňák
2019-02-18make Makefile-clang.mk also use gb_Output_announceLuboš Luňák
2019-02-18make uninteresting code in clang's makefile to the uninteresting partLuboš Luňák
2017-12-06Remove CXXFLAGS_CXX11 from Clang plugin compilationStephan Bergmann
2017-09-30Support loplugin in clang-clStephan Bergmann
2017-05-16Also filter out flags like -fsanitize-address-globals-dead-strippingStephan Bergmann