Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Catch::Generators::RandomIntegerGenerator< Integer > Class Template Referencefinal

#include <catch_generators_specific.hpp>

Inheritance diagram for Catch::Generators::RandomIntegerGenerator< Integer >:
Collaboration diagram for Catch::Generators::RandomIntegerGenerator< Integer >:

Public Member Functions

 RandomIntegerGenerator (Integer a, Integer b)
 
Integer const & get () const override
 
bool next () override
 
 RandomIntegerGenerator (Integer a, Integer b)
 
Integer const & get () const override
 
bool next () override
 
- Public Member Functions inherited from Catch::Generators::IGenerator< Integer >
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< Integer >
using type
 

Detailed Description

template<typename Integer>
class Catch::Generators::RandomIntegerGenerator< Integer >

Definition at line 4081 of file catch.hpp.

Constructor & Destructor Documentation

◆ RandomIntegerGenerator() [1/2]

template<typename Integer >
Catch::Generators::RandomIntegerGenerator< Integer >::RandomIntegerGenerator ( Integer a,
Integer b )
inline

Definition at line 49 of file catch_generators_specific.hpp.

49 :
50 m_rand(getCurrentContext().getConfig()->rngSeed()),
51 m_dist(a, b) {
52 static_cast<void>(next());
53 }
IContext & getCurrentContext()
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1181
Here is the call graph for this function:

◆ RandomIntegerGenerator() [2/2]

template<typename Integer >
Catch::Generators::RandomIntegerGenerator< Integer >::RandomIntegerGenerator ( Integer a,
Integer b )
inline

Definition at line 4087 of file catch.hpp.

4087 :
4088 m_rand(getCurrentContext().getConfig()->rngSeed()),
4089 m_dist(a, b) {
4090 static_cast<void>(next());
4091 }
Here is the call graph for this function:

Member Function Documentation

◆ get() [1/2]

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

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

Definition at line 55 of file catch_generators_specific.hpp.

55 {
56 return m_current_number;
57 }

◆ get() [2/2]

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

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

Definition at line 4093 of file catch.hpp.

4093 {
4094 return m_current_number;
4095 }

◆ next() [1/2]

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

Implements Catch::Generators::GeneratorUntypedBase.

Definition at line 58 of file catch_generators_specific.hpp.

58 {
59 m_current_number = m_dist(m_rand);
60 return true;
61 }
Here is the caller graph for this function:

◆ next() [2/2]

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

Implements Catch::Generators::GeneratorUntypedBase.

Definition at line 4096 of file catch.hpp.

4096 {
4097 m_current_number = m_dist(m_rand);
4098 return true;
4099 }

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