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

libzypp 17.38.11

zypp::Iterable< TIterator > Class Template Reference

`#include <zypp-core/base/Iterable.h>`

## Public Types
using | size_type = size_t
using | iterator_type = TIterator
using | value_type = typename std::iterator_traits<iterator_type>::value_type
using | difference_type = typename std::iterator_traits<iterator_type>::difference_type
using | pointer = typename std::iterator_traits<iterator_type>::pointer
using | reference = typename std::iterator_traits<iterator_type>::reference
using | iterator_category = typename std::iterator_traits<iterator_type>::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

## 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() ); }
};
zypp::Iterable::Iterable
Iterable()
Ctor taking the iterator pair.
Definition Iterable.h:48
zypp::makeIterable
Iterable< TIterator > makeIterable(TIterator &&begin_r, TIterator &&end_r)
relates: Iterable convenient construction.
Definition Iterable.h:88

Definition at line 36 of file Iterable.h.

## Member Typedef Documentation

## ◆ size_type

template<class TIterator>

using zypp::Iterable< TIterator >::size_type = size_t

Definition at line 39 of file Iterable.h.

## ◆ iterator_type

template<class TIterator>

using zypp::Iterable< TIterator >::iterator_type = TIterator

Definition at line 40 of file Iterable.h.

## ◆ value_type

template<class TIterator>

using zypp::Iterable< TIterator >::value_type = typename std::iterator_traits<iterator_type>::value_type

Definition at line 41 of file Iterable.h.

## ◆ difference_type

template<class TIterator>

using zypp::Iterable< TIterator >::difference_type = typename std::iterator_traits<iterator_type>::difference_type

Definition at line 42 of file Iterable.h.

## ◆ pointer

template<class TIterator>

using zypp::Iterable< TIterator >::pointer = typename std::iterator_traits<iterator_type>::pointer

Definition at line 43 of file Iterable.h.

## ◆ reference

template<class TIterator>

using zypp::Iterable< TIterator >::reference = typename std::iterator_traits<iterator_type>::reference

Definition at line 44 of file Iterable.h.

## ◆ iterator_category

template<class TIterator>

using zypp::Iterable< TIterator >::iterator_category = typename std::iterator_traits<iterator_type>::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.

## 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:

- zypp-core/base/Iterable.h