LibreOffice Module connectivity (master) 1
mysqlc_tables.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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
10#pragma once
11
12#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
13
15#include <utility>
16
18{
24{
25protected:
26 css::uno::Reference<css::sdbc::XDatabaseMetaData> m_xMetaData;
27
28 // OCollection
29 virtual void impl_refresh() override;
30 virtual ::connectivity::sdbcx::ObjectType createObject(const OUString& rName) override;
31 virtual css::uno::Reference<css::beans::XPropertySet> createDescriptor() override;
33 appendObject(const OUString& rName,
34 const css::uno::Reference<css::beans::XPropertySet>& rDescriptor) override;
35
36 void createTable(const css::uno::Reference<css::beans::XPropertySet>& descriptor);
37 virtual OUString getNameForObject(const sdbcx::ObjectType& _xObject) override;
38 // XDrop
39 virtual void dropObject(sal_Int32 nPosition, const OUString& rName) override;
40
41public:
42 Tables(css::uno::Reference<css::sdbc::XDatabaseMetaData> xMetaData,
43 ::cppu::OWeakObject& rParent, ::osl::Mutex& rMutex,
44 ::std::vector<OUString> const& rNames)
45 : sdbcx::OCollection(rParent, true, rMutex, rNames)
46 , m_xMetaData(std::move(xMetaData))
47 {
48 }
49
50 void appendNew(const OUString& _rsNewTable);
51 // TODO: should we also implement XDataDescriptorFactory, XRefreshable,
52 // XAppend, etc. ?
53};
54
55} // namespace connectivity::mysqlc
56
57/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
This implements com.sun.star.sdbcx.Container, which seems to be also known by the name of Tables and ...
void createTable(const css::uno::Reference< css::beans::XPropertySet > &descriptor)
virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override
virtual ::connectivity::sdbcx::ObjectType createObject(const OUString &rName) override
Tables(css::uno::Reference< css::sdbc::XDatabaseMetaData > xMetaData, ::cppu::OWeakObject &rParent, ::osl::Mutex &rMutex, ::std::vector< OUString > const &rNames)
virtual void dropObject(sal_Int32 nPosition, const OUString &rName) override
css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData
virtual void impl_refresh() override
void appendNew(const OUString &_rsNewTable)
virtual OUString getNameForObject(const sdbcx::ObjectType &_xObject) override
returns the name for the object.
virtual ::connectivity::sdbcx::ObjectType appendObject(const OUString &rName, const css::uno::Reference< css::beans::XPropertySet > &rDescriptor) override
appends an object described by a descriptor, under a given name
css::uno::Reference< css::beans::XPropertySet > ObjectType
Definition: VCollection.hxx:59