CARMA C++
MpmlGen.h
Go to the documentation of this file.
1 // $Id: MpmlGen.h,v 1.2 2011/06/08 18:40:13 eml Exp $
2 
3 #ifndef SZA_UTIL_MPMLGEN_H
4 #define SZA_UTIL_MPMLGEN_H
5 
15 #include "carma/szaarrayutils/regmap.h"
16 
17 #include <string>
18 #include <sstream>
19 #include <fstream>
20 
21 namespace sza {
22  namespace util {
23 
24  class MpmlGen {
25  public:
26 
30  MpmlGen();
31 
35  virtual ~MpmlGen();
36 
37  void setOutputDirectory(std::string dir);
38 
39  void writeSzaMpmlTemplate();
40 
41  void writeSzaMonitorPointMapping();
42 
43  private:
44 
45  std::string outputDirectory_;
46 
47  void writeMpmlBoardTemplate(std::ofstream& fout, RegMapBoard* board);
48  void writeMpmlRegTemplate(std::ofstream& fout, RegMapBlock* block);
49 
50  void appendStringWithHtmlSubstitution(std::ofstream& fout, std::string* str);
51 
52  void writeSzaMonitorPointMappingCcFile();
53  void writeSzaMonitorPointMappingHeaderFile();
54  void writeBaseBoardMacro(std::ofstream& fout, RegMapBoard* board);
55  void writeBoardMonitorPointMapping(std::ofstream& fout, RegMapBoard* board);
56  void writeRegMonitorPointMapping(std::ofstream& fout, RegMapBoard* board, RegMapBlock* block, bool first);
57 
58  void emacsIndentFile(std::string fileName);
59 
60  }; // End class MpmlGen
61 
62  } // End namespace util
63 } // End namespace sza
64 
65 
66 
67 #endif // End #ifndef SZA_UTIL_MPMLGEN_H