libzypp 17.31.23
zypp::Iterable< TIterator > Class Template Reference

#include <base/Iterable.h>

Public Types

typedef size_t size_type
 
typedef TIterator iterator_type
 
typedef std::iterator_traits< iterator_type >::value_type value_type
 
typedef std::iterator_traits< iterator_type >::difference_type difference_type
 
typedef std::iterator_traits< iterator_type >::pointer pointer
 
typedef std::iterator_traits< iterator_type >::reference reference
 
typedef std::iterator_traits< iterator_type >::iterator_category iterator_category
 

Public Member Functions

 Iterable ()
 Ctor taking the iterator pair.
 
 Iterable (iterator_type begin_r, iterator_type end_r)
 Ctor taking the iterator pair.
 
 Iterable (std::pair< iterator_type, iterator_type > range_r)
 Ctor taking the iterator pair.
 
iterator_type begin () const
 
iterator_type end () const
 
bool empty () const
 
size_type size () const
 
bool contains (const value_type &val_r) const
 
iterator_type find (const value_type &val_r) const
 

Private Attributes

iterator_type _begin
 
iterator_type _end
 

Related Functions

(Note that these are not member functions.)

template<class TIterator >
Iterable< TIterator > makeIterable (TIterator &&begin_r, TIterator &&end_r)
 convenient construction.
 
template<class TIterator >
Iterable< TIterator > makeIterable (std::pair< TIterator, TIterator > &&range_r)
 convenient construction.
 

Detailed Description

template<class TIterator>
class zypp::Iterable< TIterator >
struct Foo
{
class Iterator;
typedef Iterable<Iterator> IterableType;
Iterator myBegin();
Iterator myEnd();
IterableType iterate() { return makeIterable( myBegin(), myEnd() ); }
};

Definition at line 36 of file Iterable.h.

Member Typedef Documentation

◆ size_type

template<class TIterator >
typedef size_t zypp::Iterable< TIterator >::size_type

Definition at line 39 of file Iterable.h.

◆ iterator_type

template<class TIterator >
typedef TIterator zypp::Iterable< TIterator >::iterator_type

Definition at line 40 of file Iterable.h.

◆ value_type

template<class TIterator >
typedef std::iterator_traits<iterator_type>::value_type zypp::Iterable< TIterator >::value_type

Definition at line 41 of file Iterable.h.

◆ difference_type

template<class TIterator >
typedef std::iterator_traits<iterator_type>::difference_type zypp::Iterable< TIterator >::difference_type

Definition at line 42 of file Iterable.h.

◆ pointer

template<class TIterator >
typedef std::iterator_traits<iterator_type>::pointer zypp::Iterable< TIterator >::pointer

Definition at line 43 of file Iterable.h.

◆ reference

template<class TIterator >
typedef std::iterator_traits<iterator_type>::reference zypp::Iterable< TIterator >::reference

Definition at line 44 of file Iterable.h.

◆ iterator_category

template<class TIterator >
typedef std::iterator_traits<iterator_type>::iterator_category zypp::Iterable< TIterator >::iterator_category

Definition at line 45 of file Iterable.h.

Constructor & Destructor Documentation

◆ Iterable() [1/3]

template<class TIterator >
zypp::Iterable< TIterator >::Iterable ( )
inline

Ctor taking the iterator pair.

Definition at line 48 of file Iterable.h.

◆ Iterable() [2/3]

template<class TIterator >
zypp::Iterable< TIterator >::Iterable ( iterator_type  begin_r,
iterator_type  end_r 
)
inline

Ctor taking the iterator pair.

Definition at line 52 of file Iterable.h.

◆ Iterable() [3/3]

template<class TIterator >
zypp::Iterable< TIterator >::Iterable ( std::pair< iterator_type, iterator_type range_r)
inline

Ctor taking the iterator pair.

Definition at line 58 of file Iterable.h.

Member Function Documentation

◆ begin()

template<class TIterator >
iterator_type zypp::Iterable< TIterator >::begin ( ) const
inline

Definition at line 63 of file Iterable.h.

◆ end()

template<class TIterator >
iterator_type zypp::Iterable< TIterator >::end ( ) const
inline

Definition at line 66 of file Iterable.h.

◆ empty()

template<class TIterator >
bool zypp::Iterable< TIterator >::empty ( ) const
inline

Definition at line 69 of file Iterable.h.

◆ size()

template<class TIterator >
size_type zypp::Iterable< TIterator >::size ( ) const
inline

Definition at line 72 of file Iterable.h.

◆ contains()

template<class TIterator >
bool zypp::Iterable< TIterator >::contains ( const value_type val_r) const
inline

Definition at line 75 of file Iterable.h.

◆ find()

template<class TIterator >
iterator_type zypp::Iterable< TIterator >::find ( const value_type val_r) const
inline

Definition at line 78 of file Iterable.h.

Friends And Related Function Documentation

◆ makeIterable() [1/2]

template<class TIterator >
Iterable< TIterator > makeIterable ( TIterator &&  begin_r,
TIterator &&  end_r 
)
related

convenient construction.

Definition at line 88 of file Iterable.h.

◆ makeIterable() [2/2]

template<class TIterator >
Iterable< TIterator > makeIterable ( std::pair< TIterator, TIterator > &&  range_r)
related

convenient construction.

Definition at line 93 of file Iterable.h.

Member Data Documentation

◆ _begin

template<class TIterator >
iterator_type zypp::Iterable< TIterator >::_begin
private

Definition at line 82 of file Iterable.h.

◆ _end

template<class TIterator >
iterator_type zypp::Iterable< TIterator >::_end
private

Definition at line 83 of file Iterable.h.


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