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

An IntGenerator which returns a constant value. More...

#include <RandGenerator.h>

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

Public Member Functions

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

Protected Attributes

int _value
 The generator's constant value.
 

Friends

Loggeroperator<< (Logger &out, const ConstIntGenerator &gen)
 Friend function for writing string representation to an output stream. More...
 

Detailed Description

An IntGenerator which returns a constant value.

Constructor & Destructor Documentation

Menge::Math::ConstIntGenerator::ConstIntGenerator ( int  value)
inline

Constructor.

Parameters
valueThe constant value this generator returns.

Member Function Documentation

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

Return a value based on the integer generation rules.

Returns
A constant integer value.

Implements Menge::Math::IntGenerator.

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
outThe output stream to write the string representation to.

Implements Menge::Math::IntGenerator.

Friends And Related Function Documentation

Logger& operator<< ( Logger out,
const ConstIntGenerator gen 
)
friend

Friend function for writing string representation to an output stream.

Parameters
outThe output stream.
genAn 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: