Embedded Multicore Building Blocks V1.0.0
Public Member Functions | List of all members
embb::algorithms::ZipPair< TypeA, TypeB > Class Template Reference

Container for the values of two dereferenced iterators. More...

#include <zip_iterator.h>

Public Member Functions

 ZipPair (TypeA first, TypeB second)
 Constructs a pair from two values. More...
 
 ZipPair (const ZipPair &other)
 Copies a pair. More...
 
TypeA First ()
 Returns the first value of the pair. More...
 
TypeB Second ()
 Returns the second value of the pair. More...
 
const TypeA First () const
 Returns the first value of the pair. More...
 
const TypeB Second () const
 Returns the second value of the pair. More...
 

Detailed Description

template<typename TypeA, typename TypeB>
class embb::algorithms::ZipPair< TypeA, TypeB >

Container for the values of two dereferenced iterators.

The values contained are of type std::iterator_traits<Iterator>::reference.

Concurrency
Not thread-safe
Template Parameters
TypeAType of the first value
TypeBType of the first value

Constructor & Destructor Documentation

template<typename TypeA, typename TypeB>
embb::algorithms::ZipPair< TypeA, TypeB >::ZipPair ( TypeA  first,
TypeB  second 
)

Constructs a pair from two values.

Parameters
[in]firstFirst value
[in]secondSecond value
template<typename TypeA, typename TypeB>
embb::algorithms::ZipPair< TypeA, TypeB >::ZipPair ( const ZipPair< TypeA, TypeB > &  other)

Copies a pair.

Parameters
[in]otherpair to copy

Member Function Documentation

template<typename TypeA, typename TypeB>
TypeA embb::algorithms::ZipPair< TypeA, TypeB >::First ( )

Returns the first value of the pair.

Returns
The first value of the pair.
template<typename TypeA, typename TypeB>
TypeB embb::algorithms::ZipPair< TypeA, TypeB >::Second ( )

Returns the second value of the pair.

Returns
The second value of the pair
template<typename TypeA, typename TypeB>
const TypeA embb::algorithms::ZipPair< TypeA, TypeB >::First ( ) const

Returns the first value of the pair.

Returns
The first value of the pair.
template<typename TypeA, typename TypeB>
const TypeB embb::algorithms::ZipPair< TypeA, TypeB >::Second ( ) const

Returns the second value of the pair.

Returns
The second value of the pair