SingletonGenFactory Class Reference

This is the factory for the class Gen. More...

#include <SingletonGenFactory.h>

Collaboration diagram for SingletonGenFactory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

GencreateGen (GenContext *context, Individual *individual, GenPrototype *prototype) const
 random generation of a new gen.
GencreateGen (GenContext *context, Individual *individual, GenPrototype *prototype, GenContext *oldContext, Individual *oldIndividual, Gen *oldGen, bool mutate=false) const
 this function generate a new Gen by mutate a old Gen
GencreateGen (GenContext *context, Individual *individual, GenPrototype *prototype, IValue *value)
 create a new Gen by a giving value

Static Public Member Functions

static SingletonGenFactorygetInstance (void)
 this method is to become the only existing factory
static void destroyGenFactory (void)
 this method is to destroy the one and only factory.

Detailed Description

This is the factory for the class Gen.

It gives 3 Methodes to generate new gens. (random,value and mutation) Over this is the class as singleton concepted. Only one Factory for a run.

It use by every method the GenPrototype to be independent from the type of the Gen.


Member Function Documentation

Gen * createGen ( GenContext context,
Individual individual,
GenPrototype prototype,
IValue value 
)

create a new Gen by a giving value

Parameters:
context (GenContext*) the context of the new Gen
individual (Individual*) the individual, where the gen is part of.
prototype (GenPrototype*) the prototype of the gen, which should be create.
value (IValue*) the value of the new gen
Returns:

Gen * createGen ( GenContext context,
Individual individual,
GenPrototype prototype,
GenContext oldContext,
Individual oldIndividual,
Gen oldGen,
bool  mutate = false 
) const

this function generate a new Gen by mutate a old Gen

Parameters:
context (GenContext*) the context of the new Gen
individual (Individual*) the individual, where the gen is part of.
prototype (GenPrototype*) the prototype of the gen, which should be create.
oldContext (GenContext*) the Context of the old Gen
oldIndividual (Individual*) the individua, where the olg gen is part of.
oldGen (Gen*) the old Gen
mutate (bool) should be mutate?
Returns:
(Gen*) the new (or old gen)

Gen * createGen ( GenContext context,
Individual individual,
GenPrototype prototype 
) const

random generation of a new gen.

Parameters:
context (GenContext*) the context of the new Gen
individual (Individual*) the individual, where the gen is part of.
prototype (GenPrototype*) the prototype of the gen, which should be create.
Returns:
(Gen*) the new Gen

static void destroyGenFactory ( void   )  [inline, static]

this method is to destroy the one and only factory.

static SingletonGenFactory* getInstance ( void   )  [inline, static]

this method is to become the only existing factory

Returns:
(SingletonGenFactory*) the one and only factory


The documentation for this class was generated from the following files:
Generated on Fri Oct 30 16:29:02 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7