Bitstream Interpretation Library (BIL)  0.1
V5BitstreamXMLWriter.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 #ifndef BIL_V5BITSTREAMXMLWRITER_HPP
8 #define BIL_V5BITSTREAMXMLWRITER_HPP
9 
11 
12 
13 namespace bil {
14 
15  class Bitstream;
16  class XMLWriter;
17 
18 
27  public:
28 
29  /**********************************************************************/
30  /* CONSTRUCTION / DESTRUCTION */
31  /**********************************************************************/
32 
37  explicit V5BitstreamXMLWriter(XMLWriter& xmlWriter);
38 
39 
40  /**********************************************************************/
41  /* VISITING METHODS */
42  /**********************************************************************/
43 
49  virtual void visit(const BuswidthPattern& buswidthPattern);
50 
56  virtual void visit(const DummyWord& dummyWord);
57 
63  virtual void visit(const SyncWord& syncWord);
64 
70  virtual void visit(const Type1Packet& type1Packet);
71 
77  virtual void visit(const Type2Packet& type2Packet);
78 
79 
80  protected:
81 
82  /**********************************************************************/
83  /* XML WRITING */
84  /**********************************************************************/
85 
91  void writePacketTag(const BuswidthPattern& buswidthPattern);
92 
98  void writePacketTag(const DummyWord& dummyWord);
99 
105  void writePacketTag(const SyncWord& syncWord);
106 
113  void writePacketTag(const std::string& tagName, const Type2Packet& type2Packet);
114 
121  void writeData(const boost::uint32_t* words, size_t wordCount);
122 
123 
124  private:
125 
127  V5BitstreamXMLWriter& operator=(const V5BitstreamXMLWriter&);
128 
129  XMLWriter& m_xmlWriter;
130 
131  };
132 
133 
141  void writeV5BitstreamXML(XMLWriter& xmlWriter, const Bitstream& bs);
142 
143 }
144 
145 #endif