LCOV - code coverage report
Current view: top level - dbaccess/source/core/inc - viewcontainer.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 2 2 100.0 %
Date: 2014-11-03 Functions: 2 2 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             :  * 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             : #ifndef INCLUDED_DBACCESS_SOURCE_CORE_INC_VIEWCONTAINER_HXX
      21             : #define INCLUDED_DBACCESS_SOURCE_CORE_INC_VIEWCONTAINER_HXX
      22             : 
      23             : #include <cppuhelper/implbase1.hxx>
      24             : 
      25             : #include <com/sun/star/container/XEnumerationAccess.hpp>
      26             : #include <com/sun/star/container/XIndexAccess.hpp>
      27             : #include <com/sun/star/util/XRefreshable.hpp>
      28             : #include <com/sun/star/lang/XServiceInfo.hpp>
      29             : #include <com/sun/star/uno/Sequence.hxx>
      30             : #include <com/sun/star/beans/XPropertySet.hpp>
      31             : #include <com/sun/star/sdbc/SQLWarning.hpp>
      32             : #include <com/sun/star/sdb/SQLContext.hpp>
      33             : #include <com/sun/star/container/XContainerListener.hpp>
      34             : #include "apitools.hxx"
      35             : 
      36             : #include "FilteredContainer.hxx"
      37             : 
      38             : namespace dbtools
      39             : {
      40             :     class IWarningsContainer;
      41             : }
      42             : 
      43             : namespace dbaccess
      44             : {
      45             :     typedef ::cppu::ImplHelper1< ::com::sun::star::container::XContainerListener> OViewContainer_Base;
      46             : 
      47             :     // OViewContainer
      48             :     class OViewContainer :  public OFilteredContainer,
      49             :                             public OViewContainer_Base
      50             :     {
      51             :     public:
      52             :         /** ctor of the container. The parent has to support the <type scope="com::sun::star::sdbc">XConnection</type>
      53             :             interface.<BR>
      54             :             @param          _rParent            the object which acts as parent for the container.
      55             :                                                 all refcounting is rerouted to this object
      56             :             @param          _rMutex             the access safety object of the parent
      57             :             @param          _rTableFilter       restricts the visible tables by name
      58             :             @param          _rTableTypeFilter   restricts the visible tables by type
      59             :             @see            construct
      60             :         */
      61             :         OViewContainer( ::cppu::OWeakObject& _rParent,
      62             :                         ::osl::Mutex& _rMutex,
      63             :                         const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xCon,
      64             :                         bool _bCase,
      65             :                         IRefreshListener*   _pRefreshListener,
      66             :                         ::dbtools::IWarningsContainer* _pWarningsContainer,
      67             :                         oslInterlockedCount& _nInAppend
      68             :                         );
      69             : 
      70             :         virtual ~OViewContainer();
      71             : 
      72             :     protected:
      73             :         // OFilteredContainer overridables
      74             :         virtual OUString getTableTypeRestriction() const SAL_OVERRIDE;
      75             : 
      76             :     private:
      77          22 :         virtual void SAL_CALL acquire() throw() SAL_OVERRIDE { OFilteredContainer::acquire();}
      78          20 :         virtual void SAL_CALL release() throw() SAL_OVERRIDE { OFilteredContainer::release();}
      79             :     // ::com::sun::star::lang::XServiceInfo
      80             :         DECLARE_SERVICE_INFO();
      81             : 
      82             :         // XEventListener
      83             :         virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      84             :         // XContainerListener
      85             :         virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      86             :         virtual void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      87             :         virtual void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      88             : 
      89             :         // ::connectivity::sdbcx::OCollection
      90             :         virtual ::connectivity::sdbcx::ObjectType       createObject(const OUString& _rName) SAL_OVERRIDE;
      91             :         virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >   createDescriptor() SAL_OVERRIDE;
      92             :         virtual connectivity::sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) SAL_OVERRIDE;
      93             :         virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName) SAL_OVERRIDE;
      94             : 
      95             :         using OFilteredContainer::disposing;
      96             : 
      97             :         bool m_bInElementRemoved;
      98             :     };
      99             : }
     100             : #endif // INCLUDED_DBACCESS_SOURCE_CORE_INC_VIEWCONTAINER_HXX
     101             : 
     102             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10