LCOV - code coverage report
Current view: top level - dbaccess/source/core/api - RowSetCacheIterator.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 6 6 100.0 %
Date: 2014-04-11 Functions: 6 6 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             : #ifndef INCLUDED_DBACCESS_SOURCE_CORE_API_ROWSETCACHEITERATOR_HXX
      20             : #define INCLUDED_DBACCESS_SOURCE_CORE_API_ROWSETCACHEITERATOR_HXX
      21             : 
      22             : #include <sal/config.h>
      23             : 
      24             : #include <map>
      25             : 
      26             : #include "RowSetRow.hxx"
      27             : 
      28             : namespace dbaccess
      29             : {
      30             :     class ORowSetBase;
      31             :     typedef struct
      32          22 :     {
      33             :         ORowSetMatrix::iterator     aIterator;
      34             :         ::com::sun::star::uno::Any  aBookmark;
      35             :         ORowSetBase*                pRowSet;
      36         108 :     } ORowSetCacheIterator_Helper;
      37             : 
      38             :     typedef std::map<sal_Int32, ORowSetCacheIterator_Helper> ORowSetCacheMap;
      39             : 
      40             :     class ORowSetCache;
      41             :     class ORowSetCacheIterator
      42             :     {
      43             :         friend class ORowSetCache;
      44             :         ORowSetCacheMap::iterator   m_aIter;
      45             :         ORowSetCache*               m_pCache;
      46             :         ORowSetBase*                m_pRowSet;
      47             :     protected:
      48          22 :         ORowSetCacheIterator(const ORowSetCacheMap::iterator& _rIter,ORowSetCache* _pCache,ORowSetBase* _pRowSet)
      49             :             : m_aIter(_rIter)
      50             :             ,m_pCache(_pCache)
      51          22 :             ,m_pRowSet(_pRowSet)
      52             :         {
      53          22 :         }
      54             :     public:
      55         178 :         ORowSetCacheIterator() :m_aIter(),m_pCache(NULL),m_pRowSet(NULL){}
      56             :         ORowSetCacheIterator(const ORowSetCacheIterator& _rRH);
      57             :         ORowSetCacheIterator& operator =(const ORowSetCacheIterator&);
      58             : 
      59             :         sal_Bool isNull() const;
      60             :         ORowSetCacheIterator& operator =(const ORowSetMatrix::iterator&);
      61             :         operator ORowSetMatrix::iterator();
      62             : 
      63             :         ORowSetRow& operator *();
      64             :         const ORowSetRow& operator *() const;
      65             : 
      66             :         ORowSetMatrix::iterator& operator ->();
      67             :         const ORowSetMatrix::iterator& operator ->() const;
      68             : 
      69             :         bool operator <=(const ORowSetMatrix::iterator& _rRH) const;
      70             :         bool operator <(const ORowSetMatrix::iterator& _rRH) const;
      71             :         bool operator !=(const ORowSetMatrix::iterator& _rRH) const;
      72             :         bool operator ==(const ORowSetMatrix::iterator& _rRH) const;
      73             : 
      74             :         void setBookmark(const ::com::sun::star::uno::Any&  _rBookmark);
      75             :         ::com::sun::star::uno::Any getBookmark() const { return m_aIter->second.aBookmark; }
      76             :         ::osl::Mutex*   getMutex() const;
      77             : 
      78             :         ORowSetCacheMap::iterator getIter() const { return m_aIter; }
      79             :     };
      80             : }
      81             : #endif // INCLUDED_DBACCESS_SOURCE_CORE_API_ROWSETCACHEITERATOR_HXX
      82             : 
      83             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10