Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Catch::Generators::MapGenerator< T, U, Func > Class Template Reference

#include <catch_generators_generic.hpp>

Inheritance diagram for Catch::Generators::MapGenerator< T, U, Func >:
Collaboration diagram for Catch::Generators::MapGenerator< T, U, Func >:

Public Member Functions

template<typename F2 = Func>
 MapGenerator (F2 &&function, GeneratorWrapper< U > &&generator)
 
T const & get () const override
 
bool next () override
 
template<typename F2 = Func>
 MapGenerator (F2 &&function, GeneratorWrapper< U > &&generator)
 
T const & get () const override
 
bool next () override
 
- Public Member Functions inherited from Catch::Generators::IGenerator< T >
virtual ~IGenerator ()=default
 
virtual ~IGenerator ()=default
 
- Public Member Functions inherited from Catch::Generators::GeneratorUntypedBase
 GeneratorUntypedBase ()=default
 
virtual ~GeneratorUntypedBase ()
 
 GeneratorUntypedBase ()=default
 
virtual ~GeneratorUntypedBase ()
 

Additional Inherited Members

- Public Types inherited from Catch::Generators::IGenerator< T >
using type = T
 

Detailed Description

template<typename T, typename U, typename Func>
class Catch::Generators::MapGenerator< T, U, Func >

Definition at line 3828 of file catch.hpp.

Constructor & Destructor Documentation

◆ MapGenerator() [1/2]

template<typename T , typename U , typename Func >
template<typename F2 = Func>
Catch::Generators::MapGenerator< T, U, Func >::MapGenerator ( F2 && function,
GeneratorWrapper< U > && generator )
inline

Definition at line 154 of file catch_generators_generic.hpp.

154 :
155 m_generator(std::move(generator)),
156 m_function(std::forward<F2>(function)),
157 m_cache(m_function(m_generator.get()))
158 {}

◆ MapGenerator() [2/2]

template<typename T , typename U , typename Func >
template<typename F2 = Func>
Catch::Generators::MapGenerator< T, U, Func >::MapGenerator ( F2 && function,
GeneratorWrapper< U > && generator )
inline

Definition at line 3836 of file catch.hpp.

3836 :
3837 m_generator(std::move(generator)),
3838 m_function(std::forward<F2>(function)),
3839 m_cache(m_function(m_generator.get()))
3840 {}

Member Function Documentation

◆ get() [1/2]

template<typename T , typename U , typename Func >
T const & Catch::Generators::MapGenerator< T, U, Func >::get ( ) const
inlineoverridevirtual

Implements Catch::Generators::IGenerator< T >.

Definition at line 160 of file catch_generators_generic.hpp.

160 {
161 return m_cache;
162 }

◆ get() [2/2]

template<typename T , typename U , typename Func >
T const & Catch::Generators::MapGenerator< T, U, Func >::get ( ) const
inlineoverridevirtual

Implements Catch::Generators::IGenerator< T >.

Definition at line 3842 of file catch.hpp.

3842 {
3843 return m_cache;
3844 }

◆ next() [1/2]

template<typename T , typename U , typename Func >
bool Catch::Generators::MapGenerator< T, U, Func >::next ( )
inlineoverridevirtual

Implements Catch::Generators::GeneratorUntypedBase.

Definition at line 163 of file catch_generators_generic.hpp.

163 {
164 const auto success = m_generator.next();
165 if (success) {
166 m_cache = m_function(m_generator.get());
167 }
168 return success;
169 }

◆ next() [2/2]

template<typename T , typename U , typename Func >
bool Catch::Generators::MapGenerator< T, U, Func >::next ( )
inlineoverridevirtual

Implements Catch::Generators::GeneratorUntypedBase.

Definition at line 3845 of file catch.hpp.

3845 {
3846 const auto success = m_generator.next();
3847 if (success) {
3848 m_cache = m_function(m_generator.get());
3849 }
3850 return success;
3851 }
Here is the call graph for this function:

The documentation for this class was generated from the following files: