ZooDriver Class Reference

#include <zoo_driver.h>


Public Member Functions

 ZooDriver (ConfigFile *cf, int section)
 ~ZooDriver ()
ZooSpeciesGetSpeciesByName (const char *)
int Setup (void)
int Shutdown (void)
void Prepare (void)
void Run (int)
void Run (const char *)
void RunAll (void)
void Kill (int)
void Kill (const char *)
void KillAll (void)
int GetModelCount (void)
const char * GetModelNameByIndex (int)
const char * GetModelNameByPort (int)
stg_model_tGetModelByName (const char *)
stg_model_tGetModelByIndex (int)
stg_model_tGetModelByPort (int)
int GetModelPortByName (const char *)
int GetScore (const char *, void *)
int GetScoreSize (const char *)
int SetScore (const char *, void *, size_t)
int ClearScore (const char *)
void SetScoreDrawCB (zooref_score_draw_t, void *userdata)
rmap_tFindRobot (const char *modelName)
rmap_tFindRobot (int port)
rmap_tFindRobot (ZooController *)

Constructor & Destructor Documentation

ZooDriver::ZooDriver ConfigFile *  cf,
int  section
 

ZooDriver constructor. Load all the species. TODO: The Player config-file reader should really have a way of getting all child sections of a given section. Then the species and controller sections could be included directly in the zoo section, and this would be syntactically meaningful.

ZooDriver::~ZooDriver  ) 
 


Member Function Documentation

ZooSpecies * ZooDriver::GetSpeciesByName const char *   ) 
 

int ZooDriver::Setup void   ) 
 

int ZooDriver::Shutdown void   ) 
 

void ZooDriver::Prepare void   ) 
 

void ZooDriver::Run int   ) 
 

void ZooDriver::Run const char *   ) 
 

void ZooDriver::RunAll void   ) 
 

void ZooDriver::Kill int   ) 
 

void ZooDriver::Kill const char *   ) 
 

void ZooDriver::KillAll void   ) 
 

int ZooDriver::GetModelCount void   ) 
 

const char * ZooDriver::GetModelNameByIndex int   ) 
 

const char * ZooDriver::GetModelNameByPort int   ) 
 

stg_model_t * ZooDriver::GetModelByName const char *   ) 
 

stg_model_t * ZooDriver::GetModelByIndex int   ) 
 

stg_model_t * ZooDriver::GetModelByPort int   ) 
 

int ZooDriver::GetModelPortByName const char *   ) 
 

int ZooDriver::GetScore const char *  model,
void *  data
 

ZooDriver::GetScore: Get the score data for this model. If no score data has been set yet (using ::SetScore), return 0. The caller must provide enough space to store the data, which is in a format unknown to Zoo.

Parameters:
model: a string for the name of the model (the "token" field of a stg_model_t struct).
data: pointer to memory to copy the data to.
Returns:
the number of bytes copied, or -1 if the model is not found.

int ZooDriver::GetScoreSize const char *  model  ) 
 

ZooDriver::GetScoreSize: Return the size of the score data for this model. 0 could mean that no score data has been set yet.

Parameters:
model: a string for the name of the model (the "token" field of a stg_model_t struct).
Returns:
the size of the score data, or -1 if the model is not found.

int ZooDriver::SetScore const char *  model,
void *  score,
size_t  siz
 

ZooDriver::SetScore: Set the score data for this model. Reallocates storage, stored locally, each time the function is called.

Parameters:
model: a string for the name of the model (the "token" field of a stg_model_t struct).
score: a pointer to the data to be copied into the local score buffer.
siz: the number of bytes to copy.

int ZooDriver::ClearScore const char *  model  ) 
 

ZooDriver::ClearScore: Erase the score data for this model. Frees any allocated memory.

Parameters:
model: a string for the name of the model (the "token" field of a stg_model_t struct).
Returns:
-1 if the model is not found, 0 otherwise.

void ZooDriver::SetScoreDrawCB zooref_score_draw_t  ,
void *  userdata
 

rmap_t * ZooDriver::FindRobot const char *  modelName  ) 
 

rmap_t * ZooDriver::FindRobot int  port  ) 
 

rmap_t * ZooDriver::FindRobot ZooController  ) 
 


The documentation for this class was generated from the following files:
Generated on Thu Aug 11 13:08:10 2005 for Stage by  doxygen 1.4.0