Subversion Repositories HomeAutomation

Rev

Rev 1619 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1619 Rev 1627
Line 32... Line 32...
32
class Store
32
class Store
33
{
33
{
34
public:
34
public:
35
    typedef boost::shared_ptr<Store> Pointer;
35
    typedef boost::shared_ptr<Store> Pointer;
36
    typedef std::map<std::string, std::string> ParameterList;
36
    typedef std::map<std::string, std::string> ParameterList;
-
 
37
   
-
 
38
    typedef enum
-
 
39
    {
-
 
40
        FLUSH_INSTANT,
-
 
41
        FLUSH_MANUAL
-
 
42
    } FlushPolicy;
37
   
43
   
38
    Store(std::string filename);
44
    Store(std::string filename);
39
    virtual ~Store();
45
    virtual ~Store();
40
   
46
   
41
    void Flush();
47
    void Flush();
-
 
48
    void SetFlushPolicy(FlushPolicy flush_policy);
42
   
49
   
43
    ParameterList& GetParameters();
50
    ParameterList& GetParameters();
44
    std::string GetParameter(std::string name);
51
    std::string GetParameter(std::string name);
45
    void SetParameter(std::string name, std::string value);
52
    void SetParameter(std::string name, std::string value);
46
   
53
   
47
private:
54
private:
48
    ParameterList parameters_;    
55
    ParameterList parameters_;    
49
    bool modified_;
56
    bool modified_;
50
    std::string filename_;
57
    std::string filename_;
-
 
58
    FlushPolicy flush_policy;
51
   
59
   
52
};
60
};
53
 
61
 
54
}; // namespace storage
62
}; // namespace storage
55
}; // namespace atom
63
}; // namespace atom