Evocosm - A C++ Framework for Evolutionary Computing

Main Index

Created by Scott Robert Ladd at Coyote Gulch Productions.


Public Member Functions | List of all members
libevocosm::listener Class Referenceabstract

An abstract interface defining a listener. More...

#include <evocommon.h>

Inheritance diagram for libevocosm::listener:
libevocosm::listener_stdout libevocosm::null_listener

Public Member Functions

virtual void ping_generation_begin (size_t a_generation_number)=0
 Ping that a generation begins. More...
 
virtual void ping_generation_end (size_t a_generation_number)=0
 Ping that a generation ends. More...
 
virtual void ping_population_begin (size_t a_population_number)=0
 Ping that a population begins. More...
 
virtual void ping_population_end (size_t a_population_number)=0
 Ping that a population ends. More...
 
virtual void ping_fitness_test_begin (size_t a_organism_number)=0
 Ping that a test run begins. More...
 
virtual void ping_fitness_test_end (size_t a_organism_number)=0
 Ping that a test run ends. More...
 
virtual void report (const std::string &a_text)=0
 Report non-specific text. More...
 
virtual void report_error (const std::string &a_text)=0
 Send error message. More...
 
virtual void run_complete ()=0
 Evocosm is finished. More...
 
virtual void yield ()=0
 Yield. More...
 

Detailed Description

Evocosm reports its activities through a listener object derived from this abstract class. Some events state that a given event has occurred (e.g., the beginning of a new generation), while others provide text for display.

Member Function Documentation

virtual void libevocosm::listener::ping_fitness_test_begin ( size_t  a_organism_number)
pure virtual

Ping that fitness testing of an organism begins.

Parameters
a_organism_numberOne-based number of the organism

Implemented in libevocosm::listener_stdout, and libevocosm::null_listener.

virtual void libevocosm::listener::ping_fitness_test_end ( size_t  a_organism_number)
pure virtual

Ping that processing a generation has ended.

Parameters
a_organism_numberOne-based number of the organism

Implemented in libevocosm::listener_stdout, and libevocosm::null_listener.

virtual void libevocosm::listener::ping_generation_begin ( size_t  a_generation_number)
pure virtual

Ping that processing a generation begins.

Parameters
a_generation_numberOne-based number of the generation begun

Implemented in libevocosm::listener_stdout, and libevocosm::null_listener.

virtual void libevocosm::listener::ping_generation_end ( size_t  a_generation_number)
pure virtual

Ping that processing a generation has ended.

Parameters
a_generation_numberOne-based number of the generation ended

Implemented in libevocosm::listener_stdout, and libevocosm::null_listener.

virtual void libevocosm::listener::ping_population_begin ( size_t  a_population_number)
pure virtual

Ping that processing a population begins.

Parameters
a_population_numberOne-based number of the population begun

Implemented in libevocosm::listener_stdout, and libevocosm::null_listener.

virtual void libevocosm::listener::ping_population_end ( size_t  a_population_number)
pure virtual

Ping that processing a population has ended.

Parameters
a_population_numberOne-based number of the population ended

Implemented in libevocosm::listener_stdout, and libevocosm::null_listener.

virtual void libevocosm::listener::report ( const std::string &  a_text)
pure virtual

This event provide status text specific to a given type of evocosm. The base evocosm class does not call this function. The intention is that this function will be called from classes derived from evocosm to report progress, statistics, or other useful information.

Parameters
a_textApplication-specific text

Implemented in libevocosm::listener_stdout, and libevocosm::null_listener.

virtual void libevocosm::listener::report_error ( const std::string &  a_text)
pure virtual

This event provides error text specific to a given type of evocosm. The base evocosm class does not call this function. The intention is that this function will be called from classes derived from evocosm to report problems.

Parameters
a_textApplication-specific error text

Implemented in libevocosm::listener_stdout, and libevocosm::null_listener.

virtual void libevocosm::listener::run_complete ( )
pure virtual

Invoked when an evocosm finishes all processing. This way God can rest on the seventh day.

Implemented in libevocosm::listener_stdout, and libevocosm::null_listener.

virtual void libevocosm::listener::yield ( )
pure virtual

Evocosm periodically invokes this function to allow other processes to run. In most cases, this will be some sort of platform-specific sleep function, such as usleep.

Implemented in libevocosm::listener_stdout, and libevocosm::null_listener.


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

© 1996-2005 Scott Robert Ladd. All rights reserved.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.