HOPS
HOPS class reference
MHO_VexGenerator.hh
Go to the documentation of this file.
1 #ifndef MHO_VexGenerator_HH__
2 #define MHO_VexGenerator_HH__
3 
4 #include <list>
5 #include <set>
6 #include <sstream>
7 #include <string>
8 #include <vector>
9 
10 #include "MHO_JSONHeaderWrapper.hh"
11 #include "MHO_Message.hh"
12 #include "MHO_Tokenizer.hh"
13 #include "MHO_VexDefinitions.hh"
15 
16 namespace hops
17 {
18 
31 {
32  public:
34  virtual ~MHO_VexGenerator();
35 
41  void SetFilename(std::string filename);
47  void GenerateVex(mho_json& root);
48 
54  void SetIndentPadding(std::string indent_pad) { fIndentPad = indent_pad; }
55 
56  private:
57  std::string fFilename;
58 
59  //format definition
60  std::string fSpace;
61  MHO_VexDefinitions fVexDef;
62  std::string fFormatDirectory;
63  std::string fVexRevisionFlag;
64  std::string fVexVersion;
65  std::vector< std::string > fBlockNames;
71  void SetVexVersion(std::string version);
72 
78  void SetVexVersion(const char* version) { SetVexVersion(std::string(version)); };
79 
80  //for constructing the vex lines
81  std::string fPad; //indentation level for lines
82  std::string fIndentPad; //indentation "character"
83  bool fBlockFormatLoaded;
84  mho_json fBlockFormat;
85 
91  void LoadBlockFormat(std::string block_name);
92 
99  std::string GetBlockFormatFileName(std::string block_name);
100  void ConstructBlockLines(mho_json& root, std::string block_name, std::vector< std::string >& lines);
101  void ConstructElementLines(mho_json& element, std::vector< std::string >& lines);
102  void ConstructReferenceLines(mho_json& element, std::vector< std::string >& lines);
103  MHO_VexElementLineGenerator fLineGen;
104 
105  //special conditions
106  bool IsExcludedOvex(std::string block_name);
107 };
108 
109 } // namespace hops
110 
111 #endif
nlohmann::json mho_json
Definition: MHO_JSONHeaderWrapper.hh:5
Class MHO_VexDefinitions.
Definition: MHO_VexDefinitions.hh:69
Class MHO_VexGenerator.
Definition: MHO_VexGenerator.hh:31
void GenerateVex(mho_json &root)
Generates Vex file content and writes it to a specified filename.
Definition: MHO_VexGenerator.cc:21
MHO_VexGenerator()
Definition: MHO_VexGenerator.cc:7
void SetIndentPadding(std::string indent_pad)
Setter for indent padding.
Definition: MHO_VexGenerator.hh:54
void SetFilename(std::string filename)
Setter for filename.
Definition: MHO_VexGenerator.cc:16
virtual ~MHO_VexGenerator()
Definition: MHO_VexGenerator.cc:14
const char version[]
Definition: difx2mark4.c:37
Definition: MHO_ChannelLabeler.hh:17