1 /*
2  *  cDataManager_Base.h
3  *  Avida
4  *
5  *  Called "data_manager_base.hh" prior to 12/7/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 cDataManager_h
24 #define cDataManager_h
25 
26 #include <iostream>
27 
28 #ifndef cString_h
29 #include "cString.h"
30 #endif
31 
32 class cDataFile;
33 
34 class cDataManager_Base {
35 private:
36   cString filetype;
37 
38 
39   cDataManager_Base(); // @not_implemented
40   cDataManager_Base(const cDataManager_Base&); // @not_implemented
41   cDataManager_Base& operator=(const cDataManager_Base&); // @not_implemented
42 
43 public:
cDataManager_Base(const cString & in_filetype)44   cDataManager_Base(const cString & in_filetype) : filetype(in_filetype) { ; }
~cDataManager_Base()45   virtual ~cDataManager_Base() { ; }
46 
GetFiletype()47   const cString& GetFiletype() const { return filetype; }
48 
49   virtual bool Print(const cString& name, std::ostream& fp) const = 0;
50   virtual bool GetDesc(const cString& name, cString& out_desc) const = 0;
51 
52   bool PrintRow(cDataFile& data_file, cString row_entries, char sep=' ');
53 };
54 
55 #endif
56