1 #ifndef WIRECELL_ISEQUENCE 2 #define WIRECELL_ISEQUENCE 17 template<
class IDataClass>
23 typedef std::shared_ptr<this_type>
pointer;
31 template<
typename OtherIter>
32 static iterator
adapt(
const OtherIter& itr) {
35 template<
typename OtherIter>
36 static const_iterator
cadapt(
const OtherIter& itr) {
41 virtual const_iterator
cbegin()
const = 0;
42 virtual const_iterator
cend()
const = 0;
44 virtual const_iterator
end()
const {
return cbegin(); }
50 virtual iterator_range
range() {
60 template<
class IDataClass>
66 template<
typename OtherIter>
72 virtual iterator
begin() {
return m_begin; }
73 virtual iterator
end() {
return m_end; }
virtual const_iterator cend() const =0
virtual const_iterator cbegin() const =0
Concrete class must implement:
static const_iterator cadapt(const OtherIter &itr)
IDataClass::base_iterator base_iterator
SequenceAdapter(const OtherIter &begin, const OtherIter &end)
ISequence< IDataClass > this_type
IDataClass::iterator iterator
virtual const_iterator begin() const
std::shared_ptr< this_type > pointer
Access this sequence via shared (non-const) pointer.
IDataClass::const_iterator const_iterator
ISequence< IDataClass >::iterator iterator
IDataClass::iterator_range iterator_range
virtual const_iterator end() const
virtual iterator_range range()
Return begin/end pair as iterator range.
static iterator adapt(const OtherIter &itr)
Adapt one iterator to the standard facade iterator.