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::Const2DGenerator Class Reference

A 2D float generator which always returns a constant 2D vector. More...

#include <RandGenerator.h>

Inheritance diagram for Menge::Math::Const2DGenerator:
Menge::Math::Vec2DGenerator

Public Member Functions

 Const2DGenerator (const Vector2 &val)
 Constructor. More...
 
virtual Vector2 getValue () const
 Return a value based on the 2D float generation rules. More...
 
virtual Vector2 getValueConcurrent () const
 Return a value based on the 2D float 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 Vec2DGeneratorcopy () const
 Create a copy of itself. More...
 
- Public Member Functions inherited from Menge::Math::Vec2DGenerator
 Vec2DGenerator ()
 Constructor.
 
virtual ~Vec2DGenerator ()
 Virtual destructor.
 

Protected Attributes

Vector2 _value
 The constant value to return.
 

Friends

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

Detailed Description

A 2D float generator which always returns a constant 2D vector.

Constructor & Destructor Documentation

Menge::Math::Const2DGenerator::Const2DGenerator ( const Vector2 val)
inline

Constructor.

Parameters
valThe value to be returned.

Member Function Documentation

virtual Vec2DGenerator* Menge::Math::Const2DGenerator::copy ( ) const
inlinevirtual

Create a copy of itself.

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::Vec2DGenerator.

virtual Vector2 Menge::Math::Const2DGenerator::getValue ( ) const
inlinevirtual

Return a value based on the 2D float generation rules.

Returns
A constat 2D value.

Implements Menge::Math::Vec2DGenerator.

virtual Vector2 Menge::Math::Const2DGenerator::getValueConcurrent ( ) const
inlinevirtual

Return a value based on the 2D float generation rules - performed in a thread-safe manner.

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

Returns
A 2D float value.

Implements Menge::Math::Vec2DGenerator.

void Menge::Math::Const2DGenerator::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::Vec2DGenerator.

Friends And Related Function Documentation

Logger& operator<< ( Logger out,
const Const2DGenerator 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: