ManaPlus
Public Member Functions | Private Attributes
Catch::BetweenGenerator< T > Class Template Reference

#include <catch.hpp>

Inheritance diagram for Catch::BetweenGenerator< T >:
Catch::IGenerator< T >

Public Member Functions

 BetweenGenerator (T from, T to)
 
virtual T getValue (std::size_t index) const
 
virtual std::size_t size () const
 
- Public Member Functions inherited from Catch::IGenerator< T >
virtual ~IGenerator ()
 

Private Attributes

m_from
 
m_to
 

Detailed Description

template<typename T>
class Catch::BetweenGenerator< T >

Definition at line 2353 of file catch.hpp.

Constructor & Destructor Documentation

◆ BetweenGenerator()

template<typename T >
Catch::BetweenGenerator< T >::BetweenGenerator ( from,
to 
)
inline

Definition at line 2355 of file catch.hpp.

2355 : m_from( from ), m_to( to ){}

Member Function Documentation

◆ getValue()

template<typename T >
virtual T Catch::BetweenGenerator< T >::getValue ( std::size_t  index) const
inlinevirtual

Implements Catch::IGenerator< T >.

Definition at line 2357 of file catch.hpp.

2357  {
2358  return m_from+static_cast<int>( index );
2359  }

◆ size()

template<typename T >
virtual std::size_t Catch::BetweenGenerator< T >::size ( ) const
inlinevirtual

Implements Catch::IGenerator< T >.

Definition at line 2361 of file catch.hpp.

2361  {
2362  return static_cast<std::size_t>( 1+m_to-m_from );
2363  }

Field Documentation

◆ m_from

template<typename T >
T Catch::BetweenGenerator< T >::m_from
private

Definition at line 2367 of file catch.hpp.

◆ m_to

template<typename T >
T Catch::BetweenGenerator< T >::m_to
private

Definition at line 2368 of file catch.hpp.


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