Diana Software
QObjectInspector.hh
Go to the documentation of this file.
1 #ifndef _Q_OBJECT_INSPECTOR_HH_
2 #define _Q_OBJECT_INSPECTOR_HH_
3 
4 #include "TMemberInspector.h"
5 #include "QDiana.hh"
6 #include "TDataType.h"
7 #include "QError.hh"
8 #include <iostream>
9 #include "QVdt.hh"
10 #include <map>
11 
13 
14 class QObject;
15 
16 class QObjectInspector : public TMemberInspector
17 {
18  public:
19  class MemberInfo {
20  public:
21  std::string fType;
22  std::string fBranchType;
23  EDataType fEDataType;
24  std::string fStringValue;
25  void* fAddress;
26  int fSize;
27  bool fIsPointer;
28  bool fIsQObject;
30  std::string fLengthMember;
31 
32  };
33 
35 
36  MemberInfo FindBaseType(QObject* obj,const char* member);
37 
38  QError DumpOnStream(const QObject* obj,std::ostream& str);
39  QError FillFromStream(QObject* obj, std::istream& in);
40 
41  virtual void Inspect(TClass* cl, const char* parent, const char* mname, const void* addr);
42  private:
43 
44  void Assign(void* addr,EDataType dataType,const std::string& value);
45  void Resize(MemberInfo& info, int size);
46 
47  std::string TypeToBranchType(EDataType mtypes);
48  std::map<std::string, MemberInfo> fBaseTypeMembers;
49  std::map<std::string, MemberInfo> fOtherMembers;
50 
51  // QRootCintTrigger(QObjectInspector)
52 };
53 
55 #endif
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
error class with error type and description
Definition: QError.hh:115
virtual void Inspect(TClass *cl, const char *parent, const char *mname, const void *addr)
void Resize(MemberInfo &info, int size)
std::map< std::string, MemberInfo > fBaseTypeMembers
MemberInfo FindBaseType(QObject *obj, const char *member)
std::string TypeToBranchType(EDataType mtypes)
std::map< std::string, MemberInfo > fOtherMembers
QError DumpOnStream(const QObject *obj, std::ostream &str)
QError FillFromStream(QObject *obj, std::istream &in)
void Assign(void *addr, EDataType dataType, const std::string &value)
base class for objects handled by QEvent and QGlobalDataManager.
Definition: QObject.hh:76