Fix GNU C++ version check
[LibreOffice.git] / dbaccess / source / core / inc / viewcontainer.hxx
blob2f7f48cec155de4b9ed3aef576a854c41b5cab56
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <sal/config.h>
24 #include <atomic>
25 #include <cstddef>
27 #include <cppuhelper/implbase1.hxx>
29 #include <com/sun/star/beans/XPropertySet.hpp>
30 #include <com/sun/star/container/XContainerListener.hpp>
32 #include "FilteredContainer.hxx"
34 namespace dbtools
36 class WarningsContainer;
39 namespace dbaccess
41 // OViewContainer
42 class OViewContainer : public OFilteredContainer,
43 public ::cppu::ImplHelper1< css::container::XContainerListener>
45 public:
46 /** ctor of the container. The parent has to support the <type scope="css::sdbc">XConnection</type>
47 interface.<BR>
48 @param _rParent the object which acts as parent for the container.
49 all refcounting is rerouted to this object
50 @param _rMutex the access safety object of the parent
51 @param _rTableFilter restricts the visible tables by name
52 @param _rTableTypeFilter restricts the visible tables by type
53 @see construct
55 OViewContainer( ::cppu::OWeakObject& _rParent,
56 ::osl::Mutex& _rMutex,
57 const css::uno::Reference< css::sdbc::XConnection >& _xCon,
58 bool _bCase,
59 IRefreshListener* _pRefreshListener,
60 std::atomic<std::size_t>& _nInAppend
63 virtual ~OViewContainer() override;
65 protected:
66 // OFilteredContainer overridables
67 virtual OUString getTableTypeRestriction() const override;
69 private:
70 virtual void SAL_CALL acquire() noexcept override { OFilteredContainer::acquire();}
71 virtual void SAL_CALL release() noexcept override { OFilteredContainer::release();}
72 // css::lang::XServiceInfo
73 DECLARE_SERVICE_INFO();
75 // XEventListener
76 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
77 // XContainerListener
78 virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
79 virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
80 virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
82 // ::connectivity::sdbcx::OCollection
83 virtual ::connectivity::sdbcx::ObjectType createObject(const OUString& _rName) override;
84 virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override;
85 virtual connectivity::sdbcx::ObjectType appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;
86 virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName) override;
88 using OFilteredContainer::disposing;
90 bool m_bInElementRemoved;
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */