Subversion Repositories HomeAutomation

Rev

Rev 1326 | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. /*
  2.  * Protocol.h
  3.  *
  4.  *  Created on: Jul 23, 2009
  5.  *      Author: Mattias Runge
  6.  */
  7.  
  8. #ifndef PROTOCOL_H_
  9. #define PROTOCOL_H_
  10.  
  11. #include <string>
  12. #include <boost/make_shared.hpp>
  13. #include "xml/Node.h"
  14. #include "log/Logger.h"
  15.  
  16. namespace atom {
  17.  
  18. using namespace std;
  19.  
  20. class Protocol
  21. {
  22. public:
  23.     typedef boost::shared_ptr<Protocol> pointer;
  24.  
  25.     virtual ~Protocol();
  26.  
  27.     static pointer getInstance();
  28.  
  29.     void load(string filename, string cachefilename);
  30.  
  31.     xml::Node & getRootNode();
  32.     xml::Node & getRootCacheNode();
  33.  
  34.     bool isLoaded();
  35.  
  36. private:
  37.     Protocol();
  38.  
  39.     static pointer Instance;
  40.  
  41.     log::Logger LOG;
  42.  
  43.     bool myIsLoaded;
  44.     xml::Node myXmlNode;
  45.     xml::Node myXmlCacheNode;
  46. };
  47.  
  48. }
  49.  
  50. #endif /* PROTOCOL_H_ */
  51.