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

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

#include <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 ) );
GetFirst< Tp > getFirst(Tp &result_r)
Convenience function for creating GetFirst.
Definition: Functional.h:221
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)

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)

Definition at line 212 of file Functional.h.

Member Data Documentation

◆ _result

template<class Tp >
Tp* zypp::functor::GetFirst< Tp >::_result

Definition at line 216 of file Functional.h.

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