00001 //--------------------------------------------------------------------------- 00002 00003 #ifndef BehaviorBaseH 00004 #define BehaviorBaseH 00005 00006 #include "WorkerBase.h" 00007 #include "DataTypes.h" 00008 00009 class clTreePopulation; 00010 class clSimManager; 00011 00033 class clBehaviorBase : virtual public clWorkerBase{ 00034 00035 public: 00036 00041 virtual int GetBehaviorVersion() {return m_fVersionNumber;}; 00042 00048 clBehaviorBase(clSimManager *p_oSimManager); 00049 00053 virtual ~clBehaviorBase(); 00054 00060 virtual void Action(); 00061 00076 virtual short int ValidateVersionNumber(float fTestVersion); 00077 00085 virtual void RegisterTreeDataMembers(); 00086 00097 virtual void SetSpeciesTypeCombos(short int iNumCombos, 00098 stcSpeciesTypeCombo *p_whatCombos); 00099 00108 virtual void SetNameData(char *cNameString) {;}; 00109 00117 virtual short int GetNewTreeInts() {return m_iNewTreeInts;}; 00118 00126 virtual short int GetNewTreeFloats() {return m_iNewTreeFloats;}; 00127 00135 virtual short int GetNewTreeChars() {return m_iNewTreeChars;}; 00136 00144 virtual short int GetNewTreeBools() {return m_iNewTreeBools;}; 00145 00152 virtual short int GetNumSpeciesTypeCombos() {return m_iNumSpeciesTypeCombos;}; 00153 00160 virtual short int GetNumBehaviorSpecies() {return m_iNumBehaviorSpecies;}; 00161 00172 struct stcSpeciesTypeCombo GetSpeciesTypeCombo(short int iIndex); 00173 00183 virtual short int GetBehaviorSpecies(short int iIndex); 00184 00185 protected: 00186 short int m_iNumSpeciesTypeCombos; 00188 short int m_iNumBehaviorSpecies; 00191 short int *mp_iWhatSpecies; 00193 stcSpeciesTypeCombo *mp_whatSpeciesTypeCombos; 00196 //New data items to add to the tree record - defaults to 0 - behaviors should 00197 //not list an item that another behavior is also listing 00198 short int m_iNewTreeInts; 00200 short int m_iNewTreeFloats; 00202 short int m_iNewTreeChars; 00204 short int m_iNewTreeBools; 00207 float m_fVersionNumber; 00209 float m_fMinimumVersionNumber; 00213 }; //end of class clBehaviorBase 00214 00215 #endif