Rev 1310 | Rev 1318 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1309 | runge | 1 | /* |
| 1311 | runge | 2 | * Protocol.cpp |
| 1309 | runge | 3 | * |
| 4 | * Created on: Jul 23, 2009 |
||
| 5 | * Author: Mattias Runge |
||
| 6 | */ |
||
| 7 | |||
| 1311 | runge | 8 | #include "Protocol.h" |
| 1309 | runge | 9 | |
| 10 | namespace atom { |
||
| 11 | |||
| 1311 | runge | 12 | Protocol::pointer Protocol::Instance(new Protocol()); |
| 1310 | runge | 13 | |
| 1311 | runge | 14 | Protocol::Protocol() |
| 1309 | runge | 15 | { |
| 16 | // TODO Auto-generated constructor stub |
||
| 17 | |||
| 18 | } |
||
| 19 | |||
| 1311 | runge | 20 | Protocol::~Protocol() |
| 1309 | runge | 21 | { |
| 22 | // TODO Auto-generated destructor stub |
||
| 23 | } |
||
| 24 | |||
| 1311 | runge | 25 | Protocol::pointer Protocol::getInstance() |
| 1310 | runge | 26 | { |
| 1311 | runge | 27 | return Protocol::Instance; |
| 1309 | runge | 28 | } |
| 1310 | runge | 29 | |
| 1311 | runge | 30 | void Protocol::load(string filename) |
| 1310 | runge | 31 | { |
| 32 | this->myXmlNode.load(filename); |
||
| 1311 | runge | 33 | |
| 34 | // TODO Catch exceptions thrown by load |
||
| 35 | |||
| 36 | // TODO Do validation of XML-data, check if needed sections are defined |
||
| 1309 | runge | 37 | } |
| 1310 | runge | 38 | |
| 1311 | runge | 39 | xml::Node & Protocol::getRootNode() |
| 1310 | runge | 40 | { |
| 41 | return this->myXmlNode; |
||
| 42 | } |
||
| 43 | |||
| 44 | } |
||
| 1311 | runge | 45 |