An IntGenerator which returns a constant value.
More...
#include <RandGenerator.h>
|
int | _value |
| The generator's constant value.
|
|
An IntGenerator which returns a constant value.
Menge::Math::ConstIntGenerator::ConstIntGenerator |
( |
int |
value | ) |
|
|
inline |
Constructor.
- Parameters
-
value | The constant value this generator returns. |
IntGenerator * Menge::Math::ConstIntGenerator::copy |
( |
| ) |
const |
|
virtual |
Create a copy of itself.
This is the basic functionality that must be overwridden by derived classes.
- Returns
- A pointer to a new generator which is a copy of this one. The caller of this function is responsible for freeing up the memory for the copy.
Implements Menge::Math::IntGenerator.
virtual int Menge::Math::ConstIntGenerator::getValue |
( |
| ) |
const |
|
inlinevirtual |
virtual int Menge::Math::ConstIntGenerator::getValueConcurrent |
( |
| ) |
const |
|
inlinevirtual |
Return a value based on the integer generation rules - performed in a thread-safe manner.
This is the basic functionality that must be overwridden by derived classes.
- Returns
- A integer value.
Implements Menge::Math::IntGenerator.
void Menge::Math::ConstIntGenerator::print |
( |
Logger & |
out | ) |
const |
|
virtual |
Function for converting the generator to a string on a output stream.
- Parameters
-
out | The output stream to write the string representation to. |
Implements Menge::Math::IntGenerator.
Friend function for writing string representation to an output stream.
- Parameters
-
out | The output stream. |
gen | An instance of the generator to represent as a string. |
- Returns
- Reference to the input output stream.
The documentation for this class was generated from the following files:
- src/menge/MengeCore/Math/RandGenerator.h
- src/menge/MengeCore/Math/RandGenerator.cpp