All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tclass.h
Go to the documentation of this file.
1 #ifndef uscript_tclass_h
2 #define uscript_tclass_h
3 
4 #include <vector>
5 #include <string>
6 #include <map>
7 #include <unordered_map>
8 
9 namespace uscript {
10 
11 enum TFieldType {
19 };
20 
21 struct TClassInfo;
22 
23 struct TData {
26  int len;
27  int Size() const;
28  int Length(uint8_t *loc) const;
29 };
30 
31 struct TField {
32  int offset;
34 };
35 
36 struct TClassInfo {
37  std::map<const char *, TField> fields;
38  std::string name;
39  bool is_vec;
41  int size;
42 };
43 
44 class TClassList {
45 public:
46  TClassInfo *Add(const char *classname);
47  std::unordered_map<const char *, TClassInfo> classes;
48 
49 };
50 
51 } // end namespace
52 #endif
std::unordered_map< const char *, TClassInfo > classes
Definition: tclass.h:47
TData data
Definition: tclass.h:33
std::map< const char *, TField > fields
Definition: tclass.h:37
TFieldType
Definition: tclass.h:11
int Length(uint8_t *loc) const
Definition: tclass.cc:167
int Size() const
Definition: tclass.cc:153
TClassInfo * info
Definition: tclass.h:24
std::string name
Definition: tclass.h:38
TFieldType type
Definition: tclass.h:25
TClassInfo * Add(const char *classname)
Definition: tclass.cc:16