LCOV - code coverage report
Current view: top level - connectivity/source/drivers/firebird - Tables.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 3 3 100.0 %
Date: 2014-11-03 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      10             : #ifndef INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_TABLES_HXX
      11             : #define INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_TABLES_HXX
      12             : 
      13             : #include "DatabaseMetaData.hxx"
      14             : 
      15             : #include <connectivity/sdbcx/VCollection.hxx>
      16             : 
      17             : namespace connectivity
      18             : {
      19             :     namespace firebird
      20             :     {
      21             : 
      22             :         /**
      23             :          * This implements com.sun.star.sdbcx.Container, which seems to be
      24             :          * also known by the name of Tables and Collection.
      25             :          */
      26           8 :         class Tables: public ::connectivity::sdbcx::OCollection
      27             :         {
      28             :         protected:
      29             :             ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >
      30             :                 m_xMetaData;
      31             : 
      32             :             // OCollection
      33             :             virtual void impl_refresh()
      34             :                 throw(::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
      35             :             virtual ::connectivity::sdbcx::ObjectType createObject(
      36             :                                                 const ::rtl::OUString& rName) SAL_OVERRIDE;
      37             :             virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
      38             :                     createDescriptor() SAL_OVERRIDE;
      39             :             virtual ::connectivity::sdbcx::ObjectType appendObject(
      40             :                         const OUString& rName,
      41             :                         const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rDescriptor) SAL_OVERRIDE;
      42             : 
      43             :         public:
      44           4 :             Tables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& rMetaData,
      45             :                    ::cppu::OWeakObject& rParent,
      46             :                    ::osl::Mutex& rMutex,
      47           4 :                    ::connectivity::TStringVector& rNames) : sdbcx::OCollection(rParent, true, rMutex, rNames), m_xMetaData(rMetaData) {}
      48             : 
      49             :             // TODO: we should also implement XDataDescriptorFactory, XRefreshable,
      50             :             // XAppend,  etc., but all are optional.
      51             : 
      52             :             // XDrop
      53             :             virtual void dropObject(sal_Int32 nPosition, const ::rtl::OUString& rName) SAL_OVERRIDE;
      54             : 
      55             :         };
      56             : 
      57             :     } // namespace firebird
      58             : } // namespace connectivity
      59             : 
      60             : 
      61             : #endif // INCLUDED_CONNECTIVITY_SOURCE_DRIVERS_FIREBIRD_TABLES_HXX
      62             : 
      63             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10