Rev 1310 | Rev 1315 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1310 | Rev 1311 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | /* |
1 | /* |
| 2 | * |
2 | * Protocol.h |
| 3 | * |
3 | * |
| 4 | * Created on: Jul 23, 2009 |
4 | * Created on: Jul 23, 2009 |
| 5 | * Author: Mattias Runge |
5 | * Author: Mattias Runge |
| 6 | */ |
6 | */ |
| 7 | 7 | ||
| 8 | #ifndef |
8 | #ifndef PROTOCOL_H_ |
| 9 | #define |
9 | #define PROTOCOL_H_ |
| 10 | 10 | ||
| 11 | #include <string> |
11 | #include <string> |
| 12 | #include <boost/make_shared.hpp> |
12 | #include <boost/make_shared.hpp> |
| 13 | #include "xml/Node.h" |
13 | #include "xml/Node.h" |
| 14 | #include "utils/Logger.h" |
14 | #include "utils/Logger.h" |
| 15 | 15 | ||
| 16 | namespace atom { |
16 | namespace atom { |
| 17 | namespace db { |
- | |
| 18 | 17 | ||
| 19 | using namespace std; |
18 | using namespace std; |
| 20 | using namespace utils; |
19 | using namespace utils; |
| 21 | 20 | ||
| 22 | class |
21 | class Protocol |
| 23 | { |
22 | { |
| 24 | public: |
23 | public: |
| 25 | typedef boost::shared_ptr< |
24 | typedef boost::shared_ptr<Protocol> pointer; |
| 26 | 25 | ||
| 27 | virtual |
26 | virtual ~Protocol(); |
| 28 | 27 | ||
| 29 | static pointer getInstance(); |
28 | static pointer getInstance(); |
| 30 | 29 | ||
| 31 | void load(string filename); |
30 | void load(string filename); |
| 32 | 31 | ||
| 33 | xml::Node & getRootNode(); |
32 | xml::Node & getRootNode(); |
| 34 | 33 | ||
| 35 | private: |
34 | private: |
| 36 |
|
35 | Protocol(); |
| 37 | 36 | ||
| 38 | static pointer Instance; |
37 | static pointer Instance; |
| 39 | 38 | ||
| 40 | Logger LOG; |
39 | Logger LOG; |
| 41 | 40 | ||
| 42 | xml::Node myXmlNode; |
41 | xml::Node myXmlNode; |
| 43 | }; |
42 | }; |
| 44 | 43 | ||
| 45 | } |
- | |
| 46 | } |
44 | } |
| 47 | 45 | ||
| 48 | #endif /* |
46 | #endif /* PROTOCOL_H_ */ |