8#ifndef _Belle2_FieldProperty_hh
9#define _Belle2_FieldProperty_hh
39 Property(): m_type(), m_length(0), m_offset(0) {}
40 Property(Type type,
int length,
int offset = 0)
41 : m_type(type), m_length(length), m_offset(offset) {}
43 : m_type(pro.m_type), m_length(pro.m_length), m_offset(pro.m_offset) {}
47 Type getType()
const {
return m_type; }
48 int getLength()
const {
return m_length; }
49 int getOffset()
const {
return m_offset; }
50 void setType(Type type) { m_type = type; }
51 void setLength(
int length) { m_length = length; }
53 int getTypeSize()
const
56 case BOOL:
return sizeof(bool);
57 case CHAR:
return sizeof(char);
58 case SHORT:
return sizeof(short);
59 case INT:
return sizeof(int);
60 case LONG:
return sizeof(
long long);
61 case FLOAT:
return sizeof(float);
62 case DOUBLE:
return sizeof(double);
68 const std::string getTypeText()
const
71 case BOOL:
return "bool";
72 case CHAR:
return "char";
73 case SHORT:
return "short";
74 case INT:
return "int";
75 case LONG:
return "long";
76 case FLOAT:
return "float";
77 case DOUBLE:
return "double";
78 case TEXT:
return "text";
79 case OBJECT:
return "object";
92 typedef std::vector<std::string> NameList;
93 typedef std::map<std::string, DBField::Property> PropertyList;
Abstract base class for different kinds of events.