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

#include <catch_generators.hpp>

Inheritance diagram for Catch::Generators::Generators< T >:
Collaboration diagram for Catch::Generators::Generators< T >:

Public Member Functions

template<typename... Gs>
 Generators (Gs... moreGenerators)
 
T const & get () const override
 
bool next () override
 
template<typename... Gs>
 Generators (Gs... moreGenerators)
 
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>
class Catch::Generators::Generators< T >

Definition at line 3596 of file catch.hpp.

Constructor & Destructor Documentation

◆ Generators() [1/2]

template<typename T >
template<typename... Gs>
Catch::Generators::Generators< T >::Generators ( Gs... moreGenerators)
inline

Definition at line 134 of file catch_generators.hpp.

134 {
135 m_generators.reserve(sizeof...(Gs));
136 populate(std::forward<Gs>(moreGenerators)...);
137 }

◆ Generators() [2/2]

template<typename T >
template<typename... Gs>
Catch::Generators::Generators< T >::Generators ( Gs... moreGenerators)
inline

Definition at line 3618 of file catch.hpp.

3618 {
3619 m_generators.reserve(sizeof...(Gs));
3620 populate(std::forward<Gs>(moreGenerators)...);
3621 }

Member Function Documentation

◆ get() [1/2]

template<typename T >
T const & Catch::Generators::Generators< T >::get ( ) const
inlineoverridevirtual

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

Definition at line 139 of file catch_generators.hpp.

139 {
140 return m_generators[m_current].get();
141 }

◆ get() [2/2]

template<typename T >
T const & Catch::Generators::Generators< T >::get ( ) const
inlineoverridevirtual

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

Definition at line 3623 of file catch.hpp.

3623 {
3624 return m_generators[m_current].get();
3625 }

◆ next() [1/2]

template<typename T >
bool Catch::Generators::Generators< T >::next ( )
inlineoverridevirtual

Implements Catch::Generators::GeneratorUntypedBase.

Definition at line 143 of file catch_generators.hpp.

143 {
144 if (m_current >= m_generators.size()) {
145 return false;
146 }
147 const bool current_status = m_generators[m_current].next();
148 if (!current_status) {
149 ++m_current;
150 }
151 return m_current < m_generators.size();
152 }

◆ next() [2/2]

template<typename T >
bool Catch::Generators::Generators< T >::next ( )
inlineoverridevirtual

Implements Catch::Generators::GeneratorUntypedBase.

Definition at line 3627 of file catch.hpp.

3627 {
3628 if (m_current >= m_generators.size()) {
3629 return false;
3630 }
3631 const bool current_status = m_generators[m_current].next();
3632 if (!current_status) {
3633 ++m_current;
3634 }
3635 return m_current < m_generators.size();
3636 }

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