OmniSciDB  c07336695a
ReverseOddOrEvenNumberGenerator Class Reference

#include <ResultSetTestUtils.h>

+ Inheritance diagram for ReverseOddOrEvenNumberGenerator:
+ Collaboration diagram for ReverseOddOrEvenNumberGenerator:

Public Member Functions

 ReverseOddOrEvenNumberGenerator (const int64_t init)
 
int64_t getNextValue () override
 
void reset () override
 

Private Attributes

int64_t crt_
 
int64_t init_
 

Detailed Description

Definition at line 54 of file ResultSetTestUtils.h.

Constructor & Destructor Documentation

◆ ReverseOddOrEvenNumberGenerator()

ReverseOddOrEvenNumberGenerator::ReverseOddOrEvenNumberGenerator ( const int64_t  init)
inline

Definition at line 56 of file ResultSetTestUtils.h.

56 : crt_(init), init_(init) {}
void init(LogOptions const &log_opts)
Definition: Logger.cpp:260

Member Function Documentation

◆ getNextValue()

int64_t ReverseOddOrEvenNumberGenerator::getNextValue ( )
inlineoverridevirtual

Implements NumberGenerator.

Definition at line 58 of file ResultSetTestUtils.h.

58  {
59  const auto crt = crt_;
60  crt_ -= 2;
61  return crt;
62  }

◆ reset()

void ReverseOddOrEvenNumberGenerator::reset ( )
inlineoverridevirtual

Member Data Documentation

◆ crt_

int64_t ReverseOddOrEvenNumberGenerator::crt_
private

Definition at line 67 of file ResultSetTestUtils.h.

◆ init_

int64_t ReverseOddOrEvenNumberGenerator::init_
private

Definition at line 68 of file ResultSetTestUtils.h.


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