zoo_species.h

Go to the documentation of this file.
00001 #ifndef _STAGE_ZOO_SPECIES_H
00002 #define _STAGE_ZOO_SPECIES_H
00003 
00004 #include "p_driver.h"
00005 #include <limits.h>
00006 #include <vector>
00007 #include <map>
00008 #include <sys/types.h>
00009 #include <stdio.h>
00010 
00011 #include "zoo.h"
00012 
00013 /* some forward declarations here */
00014 class ZooSpecies;
00015 class ZooController;
00016 class ZooDriver;
00017 class ZooReferee;
00018 
00019 class ZooSpecies
00020 {
00021 public:
00022         ZooSpecies(void);
00023         ZooSpecies(ConfigFile *cf, int section, ZooDriver *);
00024         ~ZooSpecies();
00025         ZooController *Run(int);
00026         void RunAll(void);
00027 #if 0
00028         void Kill(int);
00029 #endif
00030         void KillAll(void);
00031         ZooController *SelectController(void);
00032         bool Hosts(int);
00033         void print(void);
00034 
00035         void SetScoreDrawCB(zooref_score_draw_t, void *userdata);
00036         zooref_score_draw_t score_draw_cb;
00037         void *score_draw_user_data;
00038 
00039         const char *name;
00040 private:
00041         int population_size;
00042         int *port_list;
00043         char **model_list;
00044         std::vector<ZooController> controller;
00045 
00046         /* used by SelectController */
00047         int next_controller;
00048         int controller_instance; // for frequency > 1
00049 
00050         ZooDriver *zoo;
00051 };
00052 
00053 #endif

Generated on Thu Dec 13 14:35:18 2007 for Stage by  doxygen 1.4.6