Implementation class, not to be used directly Iterates over valid proxies in the range.
More...
#include <SGIterator.h>
|
| void | addRef () |
| | Add a reference count to all proxies in our range.
|
| void | release () |
| | Remove a reference count from all proxies in our range.
|
Implementation class, not to be used directly Iterates over valid proxies in the range.
Maintains a reference count on proxies within the range.
Definition at line 42 of file SGIterator.h.
◆ IteratorBase() [1/4]
| SG::detail::IteratorBase::IteratorBase |
( |
| ) |
|
|
protecteddefault |
◆ IteratorBase() [2/4]
Constructor from proxy iterator pair.
- Parameters
-
| itr | Starting proxy iterator. |
| itrEnd | Ending proxy iterator. |
| isConst | If false, take only non-const proxies. |
Will skip ahead to the first valid proxy.
Definition at line 23 of file SGIterator.cxx.
26{
27 setState (itr, itrEnd, isConst).ignore();
28}
StatusCode setState(SG::ConstProxyIterator itr, SG::ConstProxyIterator itrEnd, bool isConst)
Reset state of the iterator.
◆ IteratorBase() [3/4]
template<DataProxyIterator ITERATOR>
| SG::detail::IteratorBase::IteratorBase |
( |
ITERATOR | itr, |
|
|
ITERATOR | itrEnd, |
|
|
bool | isConst ) |
|
explicitprotected |
Constructor from iterator pair over DataProxy*.
- Parameters
-
| itr | Starting iterator. |
| itrEnd | Ending iterator. |
| isConst | If false, take only non-const proxies. |
Will skip ahead to the first valid proxy.
◆ IteratorBase() [4/4]
| SG::detail::IteratorBase::IteratorBase |
( |
const IteratorBase & | other | ) |
|
|
protected |
Copy constructor.
Definition at line 34 of file SGIterator.cxx.
36{
37
39}
std::vector< SG::DataProxy * > m_proxies
All proxies in our range, in reverse order.
void addRef()
Add a reference count to all proxies in our range.
◆ ~IteratorBase()
| SG::detail::IteratorBase::~IteratorBase |
( |
| ) |
|
|
protected |
Destructor.
Definition at line 45 of file SGIterator.cxx.
46{
47
49}
void release()
Remove a reference count from all proxies in our range.
◆ addRef()
| void SG::detail::IteratorBase::addRef |
( |
| ) |
|
|
private |
Add a reference count to all proxies in our range.
◆ const_check()
| void SG::detail::IteratorBase::const_check |
( |
| ) |
const |
|
protected |
Const check: throw an exception if we're pointing at a const proxy.
Called when dereferencing a non-const iterator.
Definition at line 124 of file SGIterator.cxx.
125{
126
127
128
129 const SG::DataProxy*
dp = this->
proxy();
131 const IProxyDict*
store =
dp->store();
132 throw SG::ExcConstObject (
dp->clID(),
135 }
136}
virtual const std::string & name() const override
DataProxy * proxy() const
The proxy pointed at by this iterator.
◆ eql()
◆ increment()
| void SG::detail::IteratorBase::increment |
( |
| ) |
|
|
protected |
Move to the next valid proxy.
Used by the boost iterator adapter.
Definition at line 110 of file SGIterator.cxx.
◆ key()
| const std::string & SG::detail::IteratorBase::key |
( |
| ) |
const |
Get the key string with which the current object was stored.
Definition at line 142 of file SGIterator.cxx.
◆ operator=()
Assignment.
Definition at line 56 of file SGIterator.cxx.
57{
58 if (this != &other) {
59
63 }
64 return *this;
65}
◆ proxy()
| DataProxy * SG::detail::IteratorBase::proxy |
( |
| ) |
const |
The proxy pointed at by this iterator.
◆ release()
| void SG::detail::IteratorBase::release |
( |
| ) |
|
|
private |
Remove a reference count from all proxies in our range.
◆ setState() [1/2]
template<DataProxyIterator ITERATOR>
| StatusCode SG::detail::IteratorBase::setState |
( |
ITERATOR | itr, |
|
|
ITERATOR | itrEnd, |
|
|
bool | isConst ) |
|
protected |
Reset state of the iterator.
- Parameters
-
| itr | Starting iterator over DataProxy*. |
| itrEnd | Ending iterator. |
| isConst | Is this for a const iterator? |
Will skip ahead to the first valid proxy. Returns 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 78 of file SGIterator.cxx.
81{
85 }
86
87
88 while (itr != itrEnd) {
89 --itrEnd;
90 DataProxy*
dp = itrEnd->second;
91 if (
dp->isValid() && (isConst || !
dp->isConst())) {
94 }
95 }
96
98 return StatusCode::FAILURE;
99 }
100
101 return StatusCode::SUCCESS;
102}
◆ ::SGImplSvc
◆ boost::iterator_core_access
| friend class boost::iterator_core_access |
|
friend |
◆ m_proxies
All proxies in our range, in reverse order.
Definition at line 176 of file SGIterator.h.
The documentation for this class was generated from the following files: