Subversion Repositories HomeAutomation

Rev

Rev 1311 | Rev 1326 | 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
}
17
 
1311 runge 18
Protocol::~Protocol()
1309 runge 19
{
20
}
21
 
1311 runge 22
Protocol::pointer Protocol::getInstance()
1310 runge 23
{
1311 runge 24
    return Protocol::Instance;
1309 runge 25
}
1310 runge 26
 
1311 runge 27
void Protocol::load(string filename)
1310 runge 28
{
29
    this->myXmlNode.load(filename);
1311 runge 30
 
31
    // TODO Catch exceptions thrown by load
32
 
33
    // TODO Do validation of XML-data, check if needed sections are defined
1309 runge 34
}
1310 runge 35
 
1311 runge 36
xml::Node & Protocol::getRootNode()
1310 runge 37
{
38
    return this->myXmlNode;
39
}
40
 
41
}
1311 runge 42