The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
Gaudi::NamedRange_< CONTAINER, ITERATOR > Class Template Reference

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/NamedRange.h>

Inheritance diagram for Gaudi::NamedRange_< CONTAINER, ITERATOR >:
Collaboration diagram for Gaudi::NamedRange_< CONTAINER, ITERATOR >:

Public Member Functions

 NamedRange_ ()=default
 default constructor
 
 NamedRange_ (typename Base::iterator ibegin, typename Base::iterator iend, std::string name="")
 Constructor.
 
 NamedRange_ (const Base &base, std::string name="")
 constructor from the base class
 
 NamedRange_ (const typename Base::Base &base, std::string name="")
 constructor from the base class
 
 NamedRange_ (const typename Base::Container &base, std::string name="")
 constructor from the base class
 
 NamedRange_ (typename Base::iterator ibegin, std::string name="")
 
 ~NamedRange_ ()=default
 
NamedRange_ slice (long index1, long index2) const
 get a "slice" of a range, in Python style
 
const std::string & name () const
 get the name of the range
 
void setName (std::string value)
 set the name of the range
 
bool operator== (const Range_ &right) const
 equality with another range
 
bool operator== (const ANOTHERCONTAINER &right) const
 compare with another container
 
- Public Member Functions inherited from Gaudi::Range_< CONTAINER, typename CONTAINER::const_iterator >
 Range_ ()=default
 default constructor
 
 Range_ (InputIterator first, InputIterator last)
 Constructor.
 
 Range_ (const Base &base)
 constructor from the pair of iterators
 
 Range_ (const Container &cont)
 constructor from the container
 
 Range_ (iterator ibegin)
 
 ~Range_ ()=default
 
bool empty () const
 empty sequence ?
 
size_t size () const
 size of the sequence (number of elements)
 
iterator begin () const
 access to begin of the sequence (const version )
 
iterator end () const
 access to end of the sequence (const version)
 
iterator cbegin () const
 access to begin of the sequence (const version )
 
iterator cend () const
 access to end of the sequence (const version)
 
reverse_iterator rbegin () const
 access to begin of the reversed sequence (const)
 
reverse_iterator rend () const
 access to begin of the reversed sequence (const)
 
const_reference front () const
 access for the first element (only for non-empty ranges!)
 
const_reference back () const
 access for the back element (only for non-empty ranges!)
 
Range_ slice (long index1, long index2) const
 get a "slice" of a range, in Python style
 
const_reference operator() (const size_t index) const
 non-checked access to the elements by index (valid only for non-empty sequences)
 
const_reference operator[] (const long index) const
 non-checked access to the elements by index (valid only for non-empty sequences)
 
const_reference at (const long index) const
 Checked access to the elements by index (valid for all sequences)
 
bool operator< (const Range_< C, I > &right) const
 compare with another range
 
bool operator< (const ANOTHERCONTAINER &right) const
 compare with another container
 
bool operator== (const Range_ &right) const
 equality with another range
 
bool operator== (const ANOTHERCONTAINER &right) const
 compare with another container
 
bool operator! () const
 empty sequence?
 
 operator bool () const
 non-empty sequence?
 
 operator const Base & () const
 conversion operator to the std::pair
 
const Basebase () const
 conversion operator to the std::pair
 

Protected Types

typedef Gaudi::Range_< CONTAINER, ITERATOR > Base
 the base class
 
typedef NamedRange_< CONTAINER, ITERATOR > Self
 "self"-type
 

Private Attributes

std::string m_name
 the name, associated to the range
 

Additional Inherited Members

- Public Types inherited from Gaudi::Range_< CONTAINER, typename CONTAINER::const_iterator >
using Container
 type for actual contained iterator
 
using const_iterator
 
using iterator
 
using Base
 
typedef iter_traits::value_type value_type
 
typedef iter_traits::reference reference
 
typedef iter_traits::reference const_reference
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::reverse_iterator< iteratorconst_reverse_iterator
 

Detailed Description

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
class Gaudi::NamedRange_< CONTAINER, ITERATOR >

Definition at line 42 of file NamedRange.h.

Member Typedef Documentation

◆ Base

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
typedef Gaudi::Range_<CONTAINER, ITERATOR> Gaudi::NamedRange_< CONTAINER, ITERATOR >::Base
protected

the base class

Definition at line 45 of file NamedRange.h.

◆ Self

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
typedef NamedRange_<CONTAINER, ITERATOR> Gaudi::NamedRange_< CONTAINER, ITERATOR >::Self
protected

"self"-type

Definition at line 47 of file NamedRange.h.

Constructor & Destructor Documentation

◆ NamedRange_() [1/6]

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
Gaudi::NamedRange_< CONTAINER, ITERATOR >::NamedRange_ ( )
default

default constructor

◆ NamedRange_() [2/6]

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
Gaudi::NamedRange_< CONTAINER, ITERATOR >::NamedRange_ ( typename Base::iterator ibegin,
typename Base::iterator iend,
std::string name = "" )
inline

Constructor.

Parameters
ibeginiterator to begin of the sequence
ienditerator to end of the sequence
namename of the range

Definition at line 57 of file NamedRange.h.

◆ NamedRange_() [3/6]

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
Gaudi::NamedRange_< CONTAINER, ITERATOR >::NamedRange_ ( const Base & base,
std::string name = "" )
inline

constructor from the base class

Parameters
basebase objects
namename of the range

Definition at line 63 of file NamedRange.h.

63: Base( base ), m_name( std::move( name ) ) {}

◆ NamedRange_() [4/6]

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
Gaudi::NamedRange_< CONTAINER, ITERATOR >::NamedRange_ ( const typename Base::Base & base,
std::string name = "" )
inline

constructor from the base class

Parameters
basebase objects
namename of the range

Definition at line 68 of file NamedRange.h.

68: Base( base ), m_name( std::move( name ) ) {}

◆ NamedRange_() [5/6]

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
Gaudi::NamedRange_< CONTAINER, ITERATOR >::NamedRange_ ( const typename Base::Container & base,
std::string name = "" )
inline

constructor from the base class

Parameters
basebase objects
namename of the range

Definition at line 73 of file NamedRange.h.

74 : Base( base ), m_name( std::move( name ) ) {}

◆ NamedRange_() [6/6]

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
Gaudi::NamedRange_< CONTAINER, ITERATOR >::NamedRange_ ( typename Base::iterator ibegin,
std::string name = "" )
inline

Definition at line 79 of file NamedRange.h.

80 : Base( ibegin, ibegin ), m_name( std::move( name ) ) {}

◆ ~NamedRange_()

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
Gaudi::NamedRange_< CONTAINER, ITERATOR >::~NamedRange_ ( )
default

Member Function Documentation

◆ name()

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
const std::string & Gaudi::NamedRange_< CONTAINER, ITERATOR >::name ( ) const
inline

get the name of the range

Definition at line 90 of file NamedRange.h.

90{ return m_name; }

◆ operator==() [1/2]

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
bool Gaudi::Range_< CONTAINER, ITERATOR >::operator== ( const ANOTHERCONTAINER & right) const
inline

compare with another container

Definition at line 203 of file Range.h.

203 {
204 return right.size() == size() && std::equal( begin(), end(), right.begin() );
205 }
size_t size() const
size of the sequence (number of elements)
Definition Range.h:129

◆ operator==() [2/2]

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
bool Gaudi::Range_< CONTAINER, ITERATOR >::operator== ( const Range_ & right) const
inline

equality with another range

Definition at line 197 of file Range.h.

197 {
198 if ( &right == this ) { return true; }
199 return right.size() == size() && std::equal( begin(), end(), right.begin() );
200 }

◆ setName()

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
void Gaudi::NamedRange_< CONTAINER, ITERATOR >::setName ( std::string value)
inline

set the name of the range

Definition at line 92 of file NamedRange.h.

92{ m_name = std::move( value ); }

◆ slice()

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
NamedRange_ Gaudi::NamedRange_< CONTAINER, ITERATOR >::slice ( long index1,
long index2 ) const
inline

get a "slice" of a range, in Python style

Definition at line 86 of file NamedRange.h.

Member Data Documentation

◆ m_name

template<class CONTAINER, class ITERATOR = typename CONTAINER::const_iterator>
std::string Gaudi::NamedRange_< CONTAINER, ITERATOR >::m_name
private

the name, associated to the range

Definition at line 97 of file NamedRange.h.


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