Subversion Repositories HomeAutomation

Rev

Rev 1310 | Rev 1318 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

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