eoObject Class Reference

eoObject used to be the base class for the whole hierarchy, but this has changed. More...

#include <eoObject.h>

Inheritance diagram for eoObject:

EO< F > EO< double > EO< eoScalarFitness > EO< eoScalarFitness< ScalarType, Compare > > EO< EOT::Fitness > EO< Fit > EO< Fitness > EO< fitnessT > EO< phenotype > EO< PyFitness > eoDistribution< EOT > eoDistribution< Dummy > eoFactory< EOClass > eoFactory< Dummy > eoFactory< eoOpSelector< eoClass > > eoFactory< eoSelect< Dummy > > eoParser eoPop< EOT > eoPop< POT > eoPop< PyEO > eoRng

List of all members.

Public Member Functions

virtual ~eoObject ()
 Virtual dtor. They are needed in virtual class hierarchies.
virtual std::string className () const =0
 Return the class id.


Detailed Description

eoObject used to be the base class for the whole hierarchy, but this has changed.

eoObject is used to define a name (className#) that is used when loading or saving the state.

Previously, this object also defined a print and read interface, but itīs been moved to eoPrintable and eoPersistent.

It is recommended that you only derive from eoObject in concrete classes. Some parts of EO do not implement this yet, but that will change in the future. eoObject, together with eoPersistent and eoPrintable provide a simple persistence framework that is only needed when the classes have state that changes at runtime.

See also:
eoPersistent eoPrintable, eoState

Definition at line 55 of file eoObject.h.


Member Function Documentation

virtual std::string eoObject::className (  )  const [pure virtual]

Return the class id.

This should be redefined in each class. Only "leaf" classes can be non-virtual.

Maarten: removed the default implementation as this proved to be too error-prone: I found several classes that had a typo in className (like classname), which would print eoObject instead of their own. Having it pure will force the implementor to provide a name.

Implemented in EO< F >, eoBitParticle< FitT >, eoFactory< EOClass >, eoInt< FitT >, eoOpSelMason< eoClass >, eoPop< EOT >, eoRealParticle< FitT >, eoEsFull< Fit >, eoEsSimple< Fit >, eoEsStdev< Fit >, eoReal< FitT >, eoBit< FitT >, eoPBILDistrib< EOT >, eoString< fitnessT >, PO< F >, eoParser, eoRng, eoOneMax< FitT >, EO< double >, EO< EOT::Fitness >, EO< phenotype >, EO< fitnessT >, EO< eoScalarFitness >, EO< Fit >, EO< Fitness >, EO< eoScalarFitness< ScalarType, Compare > >, EO< PyFitness >, eoFactory< eoOpSelector< eoClass > >, eoFactory< Dummy >, eoFactory< eoSelect< Dummy > >, eoPop< PyEO >, eoPop< Dummy >, eoPop< POT >, eoBit< eoScalarFitness >, and PO< eoScalarFitness >.


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

Generated on Thu Jan 1 23:19:48 2009 for EvolvingObjects by  doxygen 1.5.5