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

libzypp 17.25.10

Public Member Functions | Private Attributes | List of all members
zypp::functor::GetFirst< Tp > Struct Template Reference

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

`#include <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::functor::getFirst
GetFirst< Tp > getFirst(Tp &result_r)
Convenience function for creating GetFirst.
Definition: Functional.h:382
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 368 of file Functional.h.

## Constructor & Destructor Documentation

## ◆ GetFirst()

template<class Tp >

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

Definition at line 370 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 373 of file Functional.h.

## Member Data Documentation

## ◆ _result

template<class Tp >

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

Definition at line 377 of file Functional.h.

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

- zypp/base/Functional.h