OmniSciDB  c07336695a
EvenNumberGenerator Class Reference

#include <ResultSetTestUtils.h>

+ Inheritance diagram for EvenNumberGenerator:
+ Collaboration diagram for EvenNumberGenerator:

Public Member Functions

 EvenNumberGenerator ()
 
int64_t getNextValue () override
 
void reset () override
 

Private Attributes

int64_t crt_
 

Detailed Description

Definition at line 38 of file ResultSetTestUtils.h.

Constructor & Destructor Documentation

◆ EvenNumberGenerator()

EvenNumberGenerator::EvenNumberGenerator ( )
inline

Definition at line 40 of file ResultSetTestUtils.h.

40 : crt_(0) {}

Member Function Documentation

◆ getNextValue()

int64_t EvenNumberGenerator::getNextValue ( )
inlineoverridevirtual

Implements NumberGenerator.

Definition at line 42 of file ResultSetTestUtils.h.

42  {
43  const auto crt = crt_;
44  crt_ += 2;
45  return crt;
46  }

◆ reset()

void EvenNumberGenerator::reset ( )
inlineoverridevirtual

Implements NumberGenerator.

Definition at line 48 of file ResultSetTestUtils.h.

48 { crt_ = 0; }

Member Data Documentation

◆ crt_

int64_t EvenNumberGenerator::crt_
private

Definition at line 51 of file ResultSetTestUtils.h.


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