-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntity.h
More file actions
executable file
·47 lines (37 loc) · 1.26 KB
/
Copy pathEntity.h
File metadata and controls
executable file
·47 lines (37 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef GLODON_OBJECTBUF_ENTITY_H
#define GLODON_OBJECTBUF_ENTITY_H
#include <google/protobuf/io/coded_stream.h>
#include "glodon/objectbuf/Objectbuf.h"
//using namespace google::protobuf;
namespace glodon {
namespace objectbuf {
class EntitySchema;
enum EnParseFieldState {
PFS_FAIL,
PFS_SUCCESS,
PFS_IGNORE
};
class Document;
class Entity
{
public:
Entity(void);
virtual ~Entity(void);
static void setDocument(Document* pDocument);
bool serialize(google::protobuf::io::CodedOutputStream* output) const;
bool parse(google::protobuf::io::CodedInputStream* input);
virtual glodon::objectbuf::EntitySchema* createSchema() const;
virtual int byteSize() const;
virtual int typeId() const = 0;
virtual bool isInitialized() const;
protected:
virtual void serializeWithCachedSizes(google::protobuf::io::CodedOutputStream* output) const;
virtual google::protobuf::uint8* serializeWithCachedSizesToArray(google::protobuf::uint8* target) const;
virtual EnParseFieldState parseField(google::protobuf::io::CodedInputStream* input, int nFieldNum);
static Document* m_pDocument;
// virtual bool parseFromCodedStream(io::CodedInputStream* input);
};
typedef int EntityRef;
}
}
#endif