ESyS-Particle  2.3.2
FieldMaster.h
Go to the documentation of this file.
1 
2 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 #ifndef __FIELDMASTER_H
14 #define __FIELDMASTER_H
15 
16 #ifdef HAVE_CONFIG_H
17 #include "config.h"
18 #endif
19 
20 #if HAVE_SILO
21 #include <silo.h>
22 #endif
23 
24 //--- STL includes ---
25 #include <string>
26 using std::string;
27 
28 // --- project includes ---
29 #include "Foundation/console.h"
30 
31 
32 class TML_Comm;
33 
40 {
41  private:
42  static int s_field_count;
43 
44  protected:
46  string m_field_name;
47  string m_file_name;
49  int m_id;
51  int m_write_type; // DX, POV. SILO, SUM, MAX, RAW_SERIES etc
52 
53  string makeFilename();
54 #if HAVE_SILO
55  DBfile* openSiloFile(bool& exists);
56 #endif
57  virtual void writeAsDX(){console.Error()<<"writeAsDX NOT IMPLEMENTED\n";};
58  virtual void writeAsPOV(){console.Error()<<"writeAsPOV NOT IMPLEMENTED\n";};
59  virtual void writeAsSILO(){console.Error()<<"writeAsSILO NOT IMPLEMENTED\n";};
60  virtual void writeAsSUM(){console.Error()<<"writeAsSUM NOT IMPLEMENTED\n";};
61  virtual void writeAsMAX(){console.Error()<<"writeAsMAX NOT IMPLEMENTED\n";};
62  virtual void writeAsRAW_SERIES(){console.Error()<<"writeAsRAW_SERIES NOT IMPLEMENTED\n";};
63  virtual void writeAsRAW2(){console.Error()<<"writeAsRAW2 NOT IMPLEMENTED\n";};
64  virtual void writeAsRAW(){console.Error()<<"writeAsRAW NOT IMPLEMENTED\n";};
65  virtual void writeAsRawWithID(){console.Error()<<"writeAsRawWithID NOT IMPLEMENTED\n";};
66  virtual void writeAsRawWithPosID(){console.Error()<<"writeAsRawWithPosID NOT IMPLEMENTED\n";};
67 
68  public:
69  AFieldMaster(TML_Comm*,const string&,const string&,const string&,int,int,int);
70  virtual ~AFieldMaster(){};
71 
72  virtual bool needSave(int);
73  virtual void collect()=0;
74  virtual void write();
75 };
76 
77 #endif //__FIELDMASTER_H