Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
Menge::Math::IntGenerator Class Referenceabstract

Generic abstract class which generates a scalar integer value. More...

#include <RandGenerator.h>

Inheritance diagram for Menge::Math::IntGenerator:
Menge::Math::ConstIntGenerator Menge::Math::UniformIntGenerator Menge::Math::WeightedIntGenerator

Public Member Functions

 IntGenerator ()
 Constructor.
 
virtual ~IntGenerator ()
 Virtual destructor.
 
virtual int getValue () const =0
 Return a value based on the integer generation rules. More...
 
virtual int getValueConcurrent () const =0
 Return a value based on the integer generation rules - performed in a thread-safe manner. More...
 
virtual void print (Logger &out) const =0
 Function for converting the generator to a string on a output stream. More...
 
virtual IntGeneratorcopy () const =0
 Create a copy of itself. More...
 

Detailed Description

Generic abstract class which generates a scalar integer value.

Member Function Documentation

virtual IntGenerator* Menge::Math::IntGenerator::copy ( ) const
pure 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.

Implemented in Menge::Math::WeightedIntGenerator, Menge::Math::UniformIntGenerator, and Menge::Math::ConstIntGenerator.

virtual int Menge::Math::IntGenerator::getValue ( ) const
pure virtual

Return a value based on the integer generation rules.

This is the basic functionality that must be overwridden by derived classes.

Returns
An integer value.

Implemented in Menge::Math::WeightedIntGenerator, Menge::Math::UniformIntGenerator, and Menge::Math::ConstIntGenerator.

virtual int Menge::Math::IntGenerator::getValueConcurrent ( ) const
pure virtual

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.

Implemented in Menge::Math::WeightedIntGenerator, Menge::Math::UniformIntGenerator, and Menge::Math::ConstIntGenerator.

virtual void Menge::Math::IntGenerator::print ( Logger out) const
pure virtual

Function for converting the generator to a string on a output stream.

This must be overridden by each derived class to provide a string format of the float generator.

Parameters
outThe output stream to write the string representation to.

Implemented in Menge::Math::WeightedIntGenerator, Menge::Math::UniformIntGenerator, and Menge::Math::ConstIntGenerator.


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