Bump version to 5.0-14
[LibreOffice.git] / dbaccess / source / core / api / RowSetCacheIterator.hxx
blob82d118e499a2cba6bf4a9ad5c4856b3a43a003e6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_CORE_API_ROWSETCACHEITERATOR_HXX
20 #define INCLUDED_DBACCESS_SOURCE_CORE_API_ROWSETCACHEITERATOR_HXX
22 #include <sal/config.h>
24 #include <map>
26 #include "RowSetRow.hxx"
28 namespace dbaccess
30 class ORowSetBase;
31 typedef struct
33 ORowSetMatrix::iterator aIterator;
34 ::com::sun::star::uno::Any aBookmark;
35 ORowSetBase* pRowSet;
36 } ORowSetCacheIterator_Helper;
38 typedef std::map<sal_Int32, ORowSetCacheIterator_Helper> ORowSetCacheMap;
40 class ORowSetCache;
41 class ORowSetCacheIterator
43 friend class ORowSetCache;
44 ORowSetCacheMap::iterator m_aIter;
45 ORowSetCache* m_pCache;
46 ORowSetBase* m_pRowSet;
47 protected:
48 ORowSetCacheIterator(const ORowSetCacheMap::iterator& _rIter,ORowSetCache* _pCache,ORowSetBase* _pRowSet)
49 : m_aIter(_rIter)
50 ,m_pCache(_pCache)
51 ,m_pRowSet(_pRowSet)
54 public:
55 ORowSetCacheIterator() :m_aIter(),m_pCache(NULL),m_pRowSet(NULL){}
56 ORowSetCacheIterator(const ORowSetCacheIterator& _rRH);
57 ORowSetCacheIterator& operator =(const ORowSetCacheIterator&);
59 bool isNull() const;
60 ORowSetCacheIterator& operator =(const ORowSetMatrix::iterator&);
61 operator ORowSetMatrix::iterator();
63 ORowSetRow& operator *();
64 const ORowSetRow& operator *() const;
66 ORowSetMatrix::iterator& operator ->();
67 const ORowSetMatrix::iterator& operator ->() const;
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;
74 void setBookmark(const ::com::sun::star::uno::Any& _rBookmark);
75 ::com::sun::star::uno::Any getBookmark() const { return m_aIter->second.aBookmark; }
77 ORowSetCacheMap::iterator getIter() const { return m_aIter; }
80 #endif // INCLUDED_DBACCESS_SOURCE_CORE_API_ROWSETCACHEITERATOR_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */