-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWriter.h
More file actions
executable file
·40 lines (35 loc) · 891 Bytes
/
Writer.h
File metadata and controls
executable file
·40 lines (35 loc) · 891 Bytes
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
#ifndef GLODON_OBJECTBUF_WRITER_H
#define GLODON_OBJECTBUF_WRITER_H
#include <QString>
#include "Entity.h"
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <fstream>
#include <map>
#include "glodon/objectbuf/Objectbuf.h"
namespace glodon {
namespace objectbuf {
// hehe next1
// branch dev
// trunk ya feature1
// featrue2
// featrue3
class Writer
{
public:
Writer(void);
~Writer(void);
void open(const QString& sFileName);
void close();
EntityRef writeEntity(Entity* pEntity);
private:
void writeSchema(EntitySchema* pSchema);
std::fstream* m_pFileStream;
google::protobuf::io::OstreamOutputStream* m_pZeroCopyStream;
google::protobuf::io::CodedOutputStream* m_pCodedOutputStream;
std::map<int, bool> m_oTypeMap;
int m_nCount;
};
}
}
#endif