00001
00002
00003 #ifndef TreeH
00004 #define TreeH
00005 #include <stddef.h>
00006
00007 class clTreePopulation;
00008
00032 class clTree {
00033 friend class clTreePopulation;
00034 friend class clTreeTestBehavior;
00035 public:
00036
00043 void SetValue(short int iCode, int iValue);
00044
00078 void SetValue(short int iCode, float fValue, bool bUpdateNow = true, bool bUpdateAllometry = true);
00079
00086 void SetValue(short int iCode, bool bValue);
00087
00094 void SetValue(short int iCode, char *cValue);
00095
00102 void GetValue(short int iCode, int *p_iValHolder);
00103
00110 void GetValue(short int iCode, float *p_fValHolder);
00111
00118 void GetValue(short int iCode, bool *p_bValHolder);
00119
00126 void GetValue(short int iCode, char *p_cValHolder);
00127
00133 short unsigned int GetSpecies(){return m_iSpecies;};
00134
00140 short unsigned int GetType(){return m_iType;};
00141
00147 clTree* GetTaller() {return mp_oNext;};
00148
00154 clTree* GetShorter() {return mp_oPrevious;};
00155
00156 protected:
00170 clTree(int iType, int iSpecies, int iNumFloats, int iNumInts, int iNumChars,
00171 int iNumBools, clTreePopulation *p_oTreePop);
00172
00176 ~clTree();
00177
00178 short unsigned int m_iSpecies;
00179 short unsigned int m_iType;
00180
00181
00182
00183 float *mp_fFloatValues;
00184 int *mp_iIntValues;
00185 char **mp_cCharValues;
00186 bool *mp_bBoolValues;
00187 static clTreePopulation *mp_oTreePop;
00192 clTree* mp_oNext;
00193 clTree* mp_oPrevious;
00195 };
00196 clTreePopulation *clTree::mp_oTreePop = NULL;
00197
00198 #endif