-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReader.h
More file actions
executable file
·37 lines (29 loc) · 905 Bytes
/
Reader.h
File metadata and controls
executable file
·37 lines (29 loc) · 905 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
#ifndef GLODON_OBJECTBUF_READER_H
#define GLODON_OBJECTBUF_READER_H
#include <QString>
#include <map>
#include "glodon/objectbuf/Objectbuf.h"
namespace glodon {
namespace objectbuf {
class Document;
class EntityFactory;
class Reader;
class FieldCacheInitializer;
typedef void (*RegSchemaInfoProc) (Reader* reader);
typedef void (*FieldCacheProc) ();
class Reader
{
public:
Reader(RegSchemaInfoProc pProc, FieldCacheProc pInitProc, FieldCacheProc pFreeProc);
~Reader(void);
bool read(const QString& sFileName, Document* pDoc);
void regSchemaInfo(const QString& sName, EntityFactory* pFactory, FieldCacheInitializer* pInitializer);
private:
void clear();
std::map<QString, std::pair<EntityFactory*, FieldCacheInitializer*>> m_oSchemaInfoMap;
std::map<int, EntityFactory*> m_oFactoryList;
FieldCacheProc m_pFreeProc;
};
}
}
#endif