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

#include <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. More...
 
 Iterable (iterator_type begin_r, iterator_type end_r)
 Ctor taking the iterator pair. More...
 
 Iterable (std::pair< iterator_type, iterator_type > range_r)
 Ctor taking the iterator pair. More...
 
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)
 
template<class TIterator >
Iterable< TIterator > makeIterable (std::pair< TIterator, TIterator > &&range_r)
 

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

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

Definition at line 39 of file Iterable.h.

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

Definition at line 40 of file Iterable.h.

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

Definition at line 41 of file Iterable.h.

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

Definition at line 42 of file Iterable.h.

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

Definition at line 43 of file Iterable.h.

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

Definition at line 44 of file Iterable.h.

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

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

Ctor taking the iterator pair.

Definition at line 48 of file Iterable.h.

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.

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

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

Definition at line 63 of file Iterable.h.

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

Definition at line 66 of file Iterable.h.

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

Definition at line 69 of file Iterable.h.

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

Definition at line 72 of file Iterable.h.

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

Definition at line 75 of file Iterable.h.

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

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

convenient construction.

Definition at line 88 of file Iterable.h.

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

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

Definition at line 82 of file Iterable.h.

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: