LibreOffice Module dbaccess (master) 1
viewcontainer.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#pragma once
21
22#include <sal/config.h>
23
24#include <atomic>
25#include <cstddef>
26
28
29#include <com/sun/star/beans/XPropertySet.hpp>
30#include <com/sun/star/container/XContainerListener.hpp>
31
32#include "FilteredContainer.hxx"
33
34namespace dbtools
35{
36 class WarningsContainer;
37}
38
39namespace dbaccess
40{
41 // OViewContainer
43 public ::cppu::ImplHelper1< css::container::XContainerListener>
44 {
45 public:
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
61 );
62
63 virtual ~OViewContainer() override;
64
65 protected:
66 // OFilteredContainer overridables
67 virtual OUString getTableTypeRestriction() const override;
68
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
74
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;
81
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;
87
89
91 };
92}
93
94/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL release() noexcept override
virtual void disposing() override
tell the container to free all elements and all additional resources.
virtual OUString getTableTypeRestriction() const override
returns a string denoting the only type of tables allowed in this container, or an empty string if th...
virtual ::connectivity::sdbcx::ObjectType createObject(const OUString &_rName) override
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
virtual void dropObject(sal_Int32 _nPos, const OUString &_sElementName) override
OViewContainer(::cppu::OWeakObject &_rParent, ::osl::Mutex &_rMutex, const css::uno::Reference< css::sdbc::XConnection > &_xCon, bool _bCase, IRefreshListener *_pRefreshListener, std::atomic< std::size_t > &_nInAppend)
ctor of the container.
virtual void disposing() override
tell the container to free all elements and all additional resources.
virtual connectivity::sdbcx::ObjectType appendObject(const OUString &_rForName, const css::uno::Reference< css::beans::XPropertySet > &descriptor) override
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
virtual ~OViewContainer() override
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override
virtual void SAL_CALL acquire() noexcept override
css::uno::Reference< css::beans::XPropertySet > ObjectType
ObjectType
Definition: object.hxx:23