eoObject(3)

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

SYNOPSIS

#include <eoObject.h>

Inherited by EO< F >, EO< double >, EO< EOT::Fitness >, EO< Fit >, EO< Fitness >, EO< fitness_type >, EO< fitnessT >, EO< FitT >, EO< FType >, EO< phenotype >, EO< PyFitness >, eoDistribution< EOT >, eoFactory< EOClass >, eoFactory< eoOpSelector< eoClass > >, eoFactory< eoSelect< EOT > >, eoFactory< EOT >, eoParser, eoPop< EOT >, eoPop< Dummy >, eoPop< PyEO >, and eoRng.

  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 >, eoFactory< EOClass >, eoOpSelMason< eoClass >, eoPop< EOT >, eoEsFull< Fit >, eoEsSimple< Fit >, eoEsStdev< Fit >, eoReal< FitT >, eoBit< FitT >, eoPBILDistrib< EOT >, eoParseTree< FType, Node >, eoString< fitnessT >, eoParser, eoRng, eoOneMax< FitT >, EO< double >, EO< EOT::Fitness >, EO< FitT >, EO< phenotype >, EO< fitnessT >, EO< Fit >, EO< FType >, EO< fitness_type >, EO< Fitness >, EO< PyFitness >, eoFactory< eoOpSelector< eoClass > >, eoFactory< EOT >, eoFactory< eoSelect< EOT > >, eoPop< PyEO >, and eoPop< Dummy >.

Author

Generated automatically by Doxygen for EO from the source code.