1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 DBACCESS_ROWSETCACHEITERATOR_HXX
20 #define DBACCESS_ROWSETCACHEITERATOR_HXX
22 #include "RowSetRow.hxx"
23 #include <comphelper/stl_types.hxx>
30 ORowSetMatrix::iterator aIterator
;
31 ::com::sun::star::uno::Any aBookmark
;
33 } ORowSetCacheIterator_Helper
;
35 DECLARE_STL_STDKEY_MAP(sal_Int32
,ORowSetCacheIterator_Helper
,ORowSetCacheMap
);
38 class ORowSetCacheIterator
40 friend class ORowSetCache
;
41 ORowSetCacheMap::iterator m_aIter
;
42 ORowSetCache
* m_pCache
;
43 ORowSetBase
* m_pRowSet
;
45 ORowSetCacheIterator(const ORowSetCacheMap::iterator
& _rIter
,ORowSetCache
* _pCache
,ORowSetBase
* _pRowSet
)
52 ORowSetCacheIterator() :m_aIter(),m_pCache(NULL
),m_pRowSet(NULL
){}
53 ORowSetCacheIterator(const ORowSetCacheIterator
& _rRH
);
54 ORowSetCacheIterator
& operator =(const ORowSetCacheIterator
&);
56 sal_Bool
isNull() const;
57 ORowSetCacheIterator
& operator =(const ORowSetMatrix::iterator
&);
58 operator ORowSetMatrix::iterator();
60 ORowSetRow
& operator *();
61 const ORowSetRow
& operator *() const;
63 ORowSetMatrix::iterator
& operator ->();
64 const ORowSetMatrix::iterator
& operator ->() const;
66 bool operator <=(const ORowSetMatrix::iterator
& _rRH
) const;
67 bool operator <(const ORowSetMatrix::iterator
& _rRH
) const;
68 bool operator !=(const ORowSetMatrix::iterator
& _rRH
) const;
69 bool operator ==(const ORowSetMatrix::iterator
& _rRH
) const;
71 void setBookmark(const ::com::sun::star::uno::Any
& _rBookmark
);
72 ::com::sun::star::uno::Any
getBookmark() const { return m_aIter
->second
.aBookmark
; }
73 ::osl::Mutex
* getMutex() const;
75 ORowSetCacheMap::iterator
getIter() const { return m_aIter
; }
78 #endif // DBACCESS_ROWSETCACHEITERATOR_HXX
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */