The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
enviroment::cIndividual Class Reference

#include <cIndividual.h>

Inheritance diagram for enviroment::cIndividual:
Collaboration diagram for enviroment::cIndividual:

List of all members.

Public Member Functions

 cIndividual (void *pInObject, const cIndividualInfo &inIndividalInfo, bool bInDeleteObjectOnDestruction=true)
 cIndividual (const cIndividual &individual)
virtual ~cIndividual ()
virtual void * getObject ()
virtual const void * getObject () const
cIndividualInfogetInfo ()
const cIndividualInfogetInfo () const
bool updateFitness (const cObjectFitnessAlgorithm *pInFitnessAlgorithm=NULL, const cObjectFitness *pBestObjectFitness=NULL)
virtual bool equal (const cIndividual &individual, bool checkIdentifiers=true) const
bool operator== (const cIndividual &individual) const
bool operator!= (const cIndividual &individual) const
virtual string getClassName () const
virtual cIndividualclone () const
virtual cIndividualclone (bool bCloneObject) const

Protected Member Functions

virtual bool kill ()

Protected Attributes

void * pObject
cIndividualInfo individalInfo
bool bDeleteObjectOnDestruction

Friends

class cEnviroment

Detailed Description

Definition at line 50 of file cIndividual.h.


Constructor & Destructor Documentation

enviroment::cIndividual::cIndividual ( void *  pInObject,
const cIndividualInfo inIndividalInfo,
bool  bInDeleteObjectOnDestruction = true 
)

constructor

Parameters:
pInObjectthe object which is represented by the individual; this object won't be copied but destructed when the individual is destructed if bInDeleteObjectOnDestruction is true
inIndividalInfothe information for the individual
bInDeleteObjectOnDestructionif true delete the object (pInObject) when the individual is deleted
enviroment::cIndividual::cIndividual ( const cIndividual individual)

copyconstructor Beware: it down't copy the contained object

Parameters:
individualthe individual to copy
virtual enviroment::cIndividual::~cIndividual ( )
virtual

destructor It deletes the objekt to the individual.


Member Function Documentation

virtual cIndividual* enviroment::cIndividual::clone ( ) const
virtual

This method clones this individual inclusive the containing object.

Returns:
a clone of this object

Reimplemented in enviroment::fib::cFibIndividual.

virtual cIndividual* enviroment::cIndividual::clone ( bool  bCloneObject) const
virtual

This method clones this individual inclusive the containing object. Beware: You have to overwrite this method in every direct child class.

Returns:
a clone of this object
Parameters:
bCloneObjectif true the object will be cloned and
See also:
bInDeleteObjectOnDestruction will be set to true, if false the object won't be cloned and
bInDeleteObjectOnDestruction will be set to false

Reimplemented in enviroment::fib::cFibIndividual.

virtual bool enviroment::cIndividual::equal ( const cIndividual individual,
bool  checkIdentifiers = true 
) const
virtual

Comparisson on equal method for two cIndividual objects.

Parameters:
individualthe cIndividual to compare this idIndividualobject to
checkIdentifiersif true (standradvalue) the identifiers will be checked also, else not
Returns:
true if the cIndividual this object represents is equal to the cIndividual the given object individual represents

Reimplemented in enviroment::fib::cFibIndividual.

virtual string enviroment::cIndividual::getClassName ( ) const
virtual
Returns:
the name of this class

Reimplemented in enviroment::fib::cFibIndividual.

cIndividualInfo* enviroment::cIndividual::getInfo ( )
Returns:
a pointer to the information for the individual
const cIndividualInfo* enviroment::cIndividual::getInfo ( ) const
Returns:
a pointer to the information for the individual
virtual void* enviroment::cIndividual::getObject ( )
virtual
Returns:
a pointer to the object which is represented by the individual
virtual const void* enviroment::cIndividual::getObject ( ) const
virtual
Returns:
a pointer to the object which is represented by the individual
virtual bool enviroment::cIndividual::kill ( )
protectedvirtual

This method kills the individual, so it isn't living anymor.

See also:
cIndividualInfo::isLiving()
cIndividualInfo::bIsLiving
Returns:
true if the individal was killed, else false

Reimplemented in enviroment::fib::cFibIndividual.

bool enviroment::cIndividual::operator!= ( const cIndividual individual) const

Comparisson on not equal operator for two cIndividual objects.

Parameters:
individualthe cIndividual to compare this idIndividualobject to
checkIdentifiersif true (standradvalue) the identifiers will be checked allso, else not
Returns:
true if the cIndividual this object represents is not equal to the cIndividual the given object individual represents
bool enviroment::cIndividual::operator== ( const cIndividual individual) const

Comparisson on equal operator for two cIndividual objects.

Parameters:
individualthe cIndividual to compare this idIndividualobject to
Returns:
true if the cIndividual this object represents is equal to the cIndividual the given object individual represents
bool enviroment::cIndividual::updateFitness ( const cObjectFitnessAlgorithm pInFitnessAlgorithm = NULL,
const cObjectFitness pBestObjectFitness = NULL 
)

This method updates the fitness of the individual.

See also:
getFitness()
Parameters:
pInFitnessAlgorithmthe fitnessalgorithm with which to update the fitness, if NULL it will be tryed to use an existing fitnessalgorithm
pBestObjectFitnessif given, the fitness of the best individual at creation time (else NULL)
See also:
cIndividualInfo::pFitnessOfBestAtCreationTime
Returns:
true if the fitness was changed, else false

Friends And Related Function Documentation

friend class cEnviroment
friend

Definition at line 52 of file cIndividual.h.


Member Data Documentation

bool enviroment::cIndividual::bDeleteObjectOnDestruction
protected

the information for the individual

Definition at line 69 of file cIndividual.h.

cIndividualInfo enviroment::cIndividual::individalInfo
protected

the information for the individual

Definition at line 64 of file cIndividual.h.

void* enviroment::cIndividual::pObject
protected

The object which is represented by the individual.

Definition at line 59 of file cIndividual.h.


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