libzypp 17.37.10

zypp::functor::GetFirst< Tp > Struct Template Reference

Strore the 1st result found in the variable passed to the ctor. More...

`#include <zypp/base/Functional.h>`

## Public Member Functions
| GetFirst (Tp &result_r)
bool | operator() (const Tp &val_r)

## Private Attributes
Tp * | _result

## Detailed Description

template<class Tp>
struct zypp::functor::GetFirst< Tp >

Strore the 1st result found in the variable passed to the ctor.

PoolItem result;
invokeOnEach( pool.byIdentBegin(installed), pool.byIdentEnd(installed),
filter::SameItem( installed ),
getFirst( result ) );
zypp::PoolItem
Combining sat::Solvable and ResStatus.
Definition PoolItem.h:51
zypp::functor::getFirst
GetFirst< Tp > getFirst(Tp &result_r)
Convenience function for creating GetFirst.
Definition Functional.h:221
zypp::pool
Definition ByIdent.h:24
zypp::invokeOnEach
int invokeOnEach(TIterator begin_r, TIterator end_r, TFilter filter_r, TFunction fnc_r)
Iterate through [begin_r,end_r) and invoke fnc_r on each item that passes filter_r.
Definition Algorithm.h:30

Definition at line 207 of file Functional.h.

## Constructor & Destructor Documentation

## ◆ GetFirst()

template<class Tp>

zypp::functor::GetFirst< Tp >::GetFirst | ( | Tp & | result_r | ) |
| inline

Definition at line 209 of file Functional.h.

## Member Function Documentation

## ◆ operator()()

template<class Tp>

bool zypp::functor::GetFirst< Tp >::operator() | ( | const Tp & | val_r | ) |
| inline

Definition at line 212 of file Functional.h.

## Member Data Documentation

## ◆ _result

template<class Tp>

Tp* zypp::functor::GetFirst< Tp >::_result
| private

Definition at line 216 of file Functional.h.

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

- zypp/base/Functional.h