Subversion Repositories HomeAutomation

Rev

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