Public Types | Public Member Functions | Static Public Member Functions | List of all members
WireCell::ISequence< IDataClass > Class Template Referenceabstract

#include <ISequence.h>

Inheritance diagram for WireCell::ISequence< IDataClass >:
WireCell::SequenceAdapter< IDataClass >

Public Types

typedef ISequence< IDataClass > this_type
 
typedef std::shared_ptr< this_typepointer
 Access this sequence via shared (non-const) pointer. More...
 
typedef IDataClass::iterator iterator
 
typedef IDataClass::const_iterator const_iterator
 
typedef IDataClass::base_iterator base_iterator
 
typedef IDataClass::iterator_range iterator_range
 

Public Member Functions

virtual const_iterator cbegin () const =0
 Concrete class must implement: More...
 
virtual const_iterator cend () const =0
 
virtual const_iterator begin () const
 
virtual const_iterator end () const
 
virtual iterator begin ()
 
virtual iterator end ()
 
virtual iterator_range range ()
 Return begin/end pair as iterator range. More...
 
virtual ~ISequence ()
 

Static Public Member Functions

template<typename OtherIter >
static iterator adapt (const OtherIter &itr)
 Adapt one iterator to the standard facade iterator. More...
 
template<typename OtherIter >
static const_iterator cadapt (const OtherIter &itr)
 

Detailed Description

template<class IDataClass>
class WireCell::ISequence< IDataClass >

Abstract base class interface for sequence of data providing facade iterators over abstract base iterators.

If a subclass multiply-inherits then one has to do myobj->ISequence<IThisData>::begin() etc or cast to the desired interface.

Definition at line 18 of file ISequence.h.

Member Typedef Documentation

template<class IDataClass>
typedef IDataClass::base_iterator WireCell::ISequence< IDataClass >::base_iterator

Definition at line 27 of file ISequence.h.

template<class IDataClass>
typedef IDataClass::const_iterator WireCell::ISequence< IDataClass >::const_iterator

Definition at line 26 of file ISequence.h.

template<class IDataClass>
typedef IDataClass::iterator WireCell::ISequence< IDataClass >::iterator

Definition at line 25 of file ISequence.h.

template<class IDataClass>
typedef IDataClass::iterator_range WireCell::ISequence< IDataClass >::iterator_range

Definition at line 28 of file ISequence.h.

template<class IDataClass>
typedef std::shared_ptr<this_type> WireCell::ISequence< IDataClass >::pointer

Access this sequence via shared (non-const) pointer.

Definition at line 23 of file ISequence.h.

template<class IDataClass>
typedef ISequence<IDataClass> WireCell::ISequence< IDataClass >::this_type

Definition at line 20 of file ISequence.h.

Constructor & Destructor Documentation

template<class IDataClass>
virtual WireCell::ISequence< IDataClass >::~ISequence ( )
virtual

Member Function Documentation

template<class IDataClass>
template<typename OtherIter >
static iterator WireCell::ISequence< IDataClass >::adapt ( const OtherIter &  itr)
inlinestatic

Adapt one iterator to the standard facade iterator.

Definition at line 32 of file ISequence.h.

32  {
33  return iterator(IteratorAdapter<OtherIter, base_iterator>(itr));
34  }
IDataClass::iterator iterator
Definition: ISequence.h:25
template<class IDataClass>
virtual const_iterator WireCell::ISequence< IDataClass >::begin ( ) const
inlinevirtual

Definition at line 43 of file ISequence.h.

43 { return cbegin(); }
virtual const_iterator cbegin() const =0
Concrete class must implement:
template<class IDataClass>
virtual iterator WireCell::ISequence< IDataClass >::begin ( )
inlinevirtual

Reimplemented in WireCell::SequenceAdapter< IDataClass >.

Definition at line 45 of file ISequence.h.

45 { return iterator(cbegin()); }
virtual const_iterator cbegin() const =0
Concrete class must implement:
IDataClass::iterator iterator
Definition: ISequence.h:25
template<class IDataClass>
template<typename OtherIter >
static const_iterator WireCell::ISequence< IDataClass >::cadapt ( const OtherIter &  itr)
inlinestatic

Definition at line 36 of file ISequence.h.

36  {
37  return const_iterator(IteratorAdapter<OtherIter, base_iterator>(itr));
38  }
IDataClass::const_iterator const_iterator
Definition: ISequence.h:26
template<class IDataClass>
virtual const_iterator WireCell::ISequence< IDataClass >::cbegin ( ) const
pure virtual

Concrete class must implement:

template<class IDataClass>
virtual const_iterator WireCell::ISequence< IDataClass >::cend ( ) const
pure virtual
template<class IDataClass>
virtual const_iterator WireCell::ISequence< IDataClass >::end ( void  ) const
inlinevirtual

Definition at line 44 of file ISequence.h.

44 { return cbegin(); }
virtual const_iterator cbegin() const =0
Concrete class must implement:
template<class IDataClass>
virtual iterator WireCell::ISequence< IDataClass >::end ( void  )
inlinevirtual

Reimplemented in WireCell::SequenceAdapter< IDataClass >.

Definition at line 46 of file ISequence.h.

46 { return iterator(cbegin()); }
virtual const_iterator cbegin() const =0
Concrete class must implement:
IDataClass::iterator iterator
Definition: ISequence.h:25
template<class IDataClass>
virtual iterator_range WireCell::ISequence< IDataClass >::range ( )
inlinevirtual

Return begin/end pair as iterator range.

Definition at line 50 of file ISequence.h.

50  {
51  return iterator_range(begin(), end());
52  }
virtual const_iterator begin() const
Definition: ISequence.h:43
IDataClass::iterator_range iterator_range
Definition: ISequence.h:28
virtual const_iterator end() const
Definition: ISequence.h:44

The documentation for this class was generated from the following file: