LibreOffice Module dbaccess (master) 1
tablecontainer.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#include <rtl/ref.hxx>
29#include <com/sun/star/sdbc/XConnection.hpp>
30#include <com/sun/star/beans/XPropertySet.hpp>
31#include <com/sun/star/container/XContainerListener.hpp>
32#include <com/sun/star/container/XNameContainer.hpp>
33#include "FilteredContainer.hxx"
34#include "RefreshListener.hxx"
35
36namespace dbaccess
37{
38 // OTableContainer
39 class OContainerMediator;
40
42 public ::cppu::ImplHelper1< css::container::XContainerListener>
43 {
44 css::uno::Reference< css::container::XNameContainer > m_xTableDefinitions;
46
47 // OFilteredContainer
48 virtual void addMasterContainerListener() override;
49 virtual void removeMasterContainerListener() override;
50 virtual OUString getTableTypeRestriction() const override;
51
52 // ::connectivity::sdbcx::OCollection
53 virtual connectivity::sdbcx::ObjectType createObject(const OUString& _rName) override;
54 virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override;
55 virtual connectivity::sdbcx::ObjectType appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override;
56 virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName) override;
57
58 virtual void disposing() override;
59
60 // css::lang::XServiceInfo
62
63 // XEventListener
64 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
65 // XContainerListener
66 virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
67 virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
68 virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
69
70 public:
71 virtual void SAL_CALL acquire() noexcept override { OFilteredContainer::acquire();}
72 virtual void SAL_CALL release() noexcept override { OFilteredContainer::release();}
73
84 ::osl::Mutex& _rMutex,
85 const css::uno::Reference< css::sdbc::XConnection >& _xCon,
86 bool _bCase,
87 const css::uno::Reference< css::container::XNameContainer >& _xTableDefinitions,
88 IRefreshListener* _pRefreshListener,
89 std::atomic<std::size_t>& _nInAppend
90 );
91
92 virtual ~OTableContainer() override;
93 };
94}
95
96/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL release() noexcept override
virtual void addMasterContainerListener() override
virtual void SAL_CALL elementRemoved(const css::container::ContainerEvent &Event) override
virtual void SAL_CALL acquire() noexcept override
css::uno::Reference< css::container::XNameContainer > m_xTableDefinitions
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 connectivity::sdbcx::ObjectType createObject(const OUString &_rName) override
virtual void removeMasterContainerListener() override
virtual void dropObject(sal_Int32 _nPos, const OUString &_sElementName) override
virtual void SAL_CALL release() noexcept override
::rtl::Reference< OContainerMediator > m_pTableMediator
OTableContainer(::cppu::OWeakObject &_rParent, ::osl::Mutex &_rMutex, const css::uno::Reference< css::sdbc::XConnection > &_xCon, bool _bCase, const css::uno::Reference< css::container::XNameContainer > &_xTableDefinitions, IRefreshListener *_pRefreshListener, std::atomic< std::size_t > &_nInAppend)
ctor of the container.
virtual ~OTableContainer() override
virtual void SAL_CALL elementInserted(const css::container::ContainerEvent &Event) override
virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override
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 void SAL_CALL elementReplaced(const css::container::ContainerEvent &Event) override
css::uno::Reference< css::beans::XPropertySet > ObjectType