libzypp  17.25.1
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 ) );

Definition at line 368 of file Functional.h.

Constructor & Destructor Documentation

◆ GetFirst()

template<class Tp >
zypp::functor::GetFirst< Tp >::GetFirst ( Tp &  result_r)

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)

Definition at line 373 of file Functional.h.

Member Data Documentation

◆ _result

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

Definition at line 377 of file Functional.h.

The documentation for this struct was generated from the following file:
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
GetFirst< Tp > getFirst(Tp &result_r)
Convenience function for creating GetFirst.
Definition: Functional.h:382