Subversion Repositories HomeAutomation

Rev

Rev 1309 | Go to most recent revision | Blame | Last modification | View Log | SVN | RSS feed

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