OpenDaVINCI  4.16.0
MessagePrettyPrinterVisitor.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_CORE_REFLECTION_MESSAGEPRETTYPRINTERVISITOR_H_
21 #define OPENDAVINCI_CORE_REFLECTION_MESSAGEPRETTYPRINTERVISITOR_H_
22 
23 #include <sstream>
24 #include <string>
25 
28 
29 namespace odcore { namespace serialization { class Serializable; } }
30 
31 namespace odcore {
32  namespace reflection {
33 
34  using namespace std;
35 
40  private:
47 
54 
55  public:
57 
63  MessagePrettyPrinterVisitor(const uint16_t &indent);
64 
65  virtual ~MessagePrettyPrinterVisitor();
66 
67  virtual void getOutput(ostream &o);
68 
69  public:
70  virtual void beginVisit(const int32_t &id, const string &shortName, const string &longName);
71  virtual void endVisit();
72 
73  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, odcore::serialization::Serializable &v);
74  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, bool &v);
75  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, char &v);
76  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, unsigned char &v);
77  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, int8_t &v);
78  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, int16_t &v);
79  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, uint16_t &v);
80  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, int32_t &v);
81  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, uint32_t &v);
82  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, int64_t &v);
83  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, uint64_t &v);
84  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, float &v);
85  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, double &v);
86  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, string &v);
87  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, void *data, const uint32_t &size);
88  virtual void visit(const uint32_t &id, const string &longName, const string &shortName, void *data, const uint32_t &count, const odcore::TYPE_ &t);
89 
90  private:
91  uint16_t m_indent;
92  stringstream m_buffer;
93  };
94 
95  }
96 } // odcore::reflection
97 
98 #endif /*OPENDAVINCI_CORE_REFLECTION_MESSAGEPRETTYPRINTERVISITOR_H_*/
Definition: MessagePrettyPrinterVisitor.h:39
TYPE_
Definition: opendavinci.h:96
Definition: Visitor.h:37
Definition: Serializable.h:59