a const_iterator facade to DataHandle.
More...
#include <SGIterator.h>
|
| bool | equal (const ConstIterator &rhs) const |
| | Equality check.
|
| const DATA & | dereference () const |
| | Dereference the iterator.
|
| void | addRef () |
| | Add a reference count to all proxies in our range.
|
| void | release () |
| | Remove a reference count from all proxies in our range.
|
template<class DATA>
class SG::ConstIterator< DATA >
a const_iterator facade to DataHandle.
Behaves like a forward iterator
Definition at line 158 of file SGIterator.h.
◆ ConstIterator() [1/2]
◆ ConstIterator() [2/2]
Constructor from proxy iterator pair.
- Parameters
-
| itr | Starting proxy iterator. |
| itrEnd | Ending proxy iterator. |
Will skip ahead to the first valid proxy.
◆ addRef()
| void SG::detail::IteratorBase::addRef |
( |
| ) |
|
|
privateinherited |
Add a reference count to all proxies in our range.
◆ const_check()
| void SG::detail::IteratorBase::const_check |
( |
| ) |
const |
|
protectedinherited |
Const check: throw an exception if we're pointing at a const proxy.
Called when dereferencing a non-const iterator.
Definition at line 137 of file SGIterator.cxx.
138{
139
140
141
142 const SG::DataProxy*
dp = this->
proxy();
144 const IProxyDict*
store =
dp->store();
145 throw SG::ExcConstObject (
dp->clID(),
148 }
149}
virtual const std::string & name() const override
DataProxy * proxy() const
The proxy pointed at by this iterator.
◆ dereference()
Dereference the iterator.
Used by the boost iterator adapter.
Will throw SG::ExcInvalidIterator() if the proxy is not valid.
◆ eql()
| bool SG::detail::IteratorBase::eql |
( |
const IteratorBase & | rhs | ) |
const |
|
protectedinherited |
◆ equal()
Equality check.
Used by the boost iterator adapter.
◆ increment()
| void SG::detail::IteratorBase::increment |
( |
| ) |
|
|
protectedinherited |
Move to the next valid proxy.
Used by the boost iterator adapter.
Definition at line 123 of file SGIterator.cxx.
124{
128 }
129}
std::vector< SG::DataProxy * > m_proxies
All proxies in our range, in reverse order.
◆ key()
| const std::string & SG::detail::IteratorBase::key |
( |
| ) |
const |
|
inherited |
Get the key string with which the current object was stored.
Definition at line 155 of file SGIterator.cxx.
◆ proxy()
| DataProxy * SG::detail::IteratorBase::proxy |
( |
| ) |
const |
|
inherited |
The proxy pointed at by this iterator.
◆ release()
| void SG::detail::IteratorBase::release |
( |
| ) |
|
|
privateinherited |
Remove a reference count from all proxies in our range.
◆ setState() [1/2]
Reset state of the iterator.
- Parameters
-
| itr | Starting proxy iterator. |
| itrEnd | Ending proxy iterator. |
Will skip ahead to the first valid proxy. Will return failure if the range is empty.
◆ setState() [2/2]
Reset state of the iterator.
- Parameters
-
| itr | Starting proxy iterator. |
| itrEnd | Ending proxy iterator. |
| isConst | Is this for a const iterator? |
Will skip ahead to the first valid proxy. Returns FAILURE if the range is empty.
Definition at line 94 of file SGIterator.cxx.
97{
100
101 while (itr != itrEnd) {
102 --itrEnd;
103 DataProxy*
dp = itrEnd->second;
104 if (
dp->isValid() && (isConst || !
dp->isConst())) {
107 }
108 }
109
111 return StatusCode::FAILURE;
112 }
113
114 return StatusCode::SUCCESS;
115}
void release()
Remove a reference count from all proxies in our range.
◆ boost::iterator_core_access
template<class DATA>
| friend class boost::iterator_core_access |
|
friend |
◆ m_proxies
All proxies in our range, in reverse order.
Definition at line 146 of file SGIterator.h.
The documentation for this class was generated from the following file: