1 /*
2  *  cClassificationManager.h
3  *  Avida
4  *
5  *  Created by David on 11/14/05.
6  *  Copyright 1999-2011 Michigan State University. All rights reserved.
7  *  Copyright 1993-2003 California Institute of Technology.
8  *
9  *
10  *  This file is part of Avida.
11  *
12  *  Avida is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License
13  *  as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
14  *
15  *  Avida is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
17  *
18  *  You should have received a copy of the GNU Lesser General Public License along with Avida.
19  *  If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef cClassificationManager_h
24 #define cClassificationManager_h
25 
26 #ifndef cString_h
27 #include "cString.h"
28 #endif
29 #ifndef tArray_h
30 #include "tArray.h"
31 #endif
32 #ifndef tArrayMap_h
33 #include "tArrayMap.h"
34 #endif
35 
36 class cBioGroupManager;
37 class cBioUnit;
38 class cDataFile;
39 class cStats;
40 class cWorld;
41 
42 
43 class cClassificationManager
44 {
45 private:
46   cWorld* m_world;
47 
48   tArray<cBioGroupManager*> m_bgms;
49 
50 
51   cClassificationManager(); // @not_implemented
52   cClassificationManager(const cClassificationManager&); // @not_implemented
53   cClassificationManager& operator=(const cClassificationManager&); // @not_implemented
54 
55 
56 public:
57   cClassificationManager(cWorld* world);
58   ~cClassificationManager();
59 
60   void UpdateReset();
61   void UpdateStats(cStats& stats);
62 
63   bool RegisterBioGroupManager(cBioGroupManager* bgm, const cString& role, const tArray<cString>* dependencies = NULL);
64   cBioGroupManager* GetBioGroupManager(const cString& role);
65 
66   void ClassifyNewBioUnit(cBioUnit* bu, tArrayMap<cString, tArrayMap<cString, cString> >* hints = NULL);
67 
68   void SaveBioGroups(const cString& role, cDataFile& df);
69 };
70 
71 
72 #endif
73