Subversion Repositories HomeAutomation

Rev

Rev 1619 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1619 Rev 1627
Line 60... Line 60...
60
}
60
}
61
 
61
 
62
void Manager::SetRootPath(std::string root_path)
62
void Manager::SetRootPath(std::string root_path)
63
{
63
{
64
    this->root_path_ = root_path;
64
    this->root_path_ = root_path;
-
 
65
}
-
 
66
 
-
 
67
void Manager::SetStoreFlushPolicy(std::string store_name, Store::FlushPolicy flush_policy)
-
 
68
{
-
 
69
    StoreList::iterator it = this->stores_.find(store_name);
-
 
70
   
-
 
71
    if (it == this->stores_.end())
-
 
72
    {
-
 
73
        LOG.Info("Loading storage " + store_name + "...");
-
 
74
        this->stores_[store_name] = Store::Pointer(new Store(this->root_path_ + store_name));
-
 
75
    }
-
 
76
   
-
 
77
    this->stores_[store_name]->SetFlushPolicy(flush_policy);
-
 
78
}
-
 
79
 
-
 
80
void Manager::FlushStore(std::string store_name)
-
 
81
{
-
 
82
    StoreList::iterator it = this->stores_.find(store_name);
-
 
83
   
-
 
84
    if (it == this->stores_.end())
-
 
85
    {
-
 
86
        LOG.Info("Loading storage " + store_name + "...");
-
 
87
        this->stores_[store_name] = Store::Pointer(new Store(this->root_path_ + store_name));
-
 
88
    }
-
 
89
   
-
 
90
    this->stores_[store_name]->Flush();
65
}
91
}
66
 
92
 
67
Store::ParameterList& Manager::GetParameters(std::string store_name)
93
Store::ParameterList& Manager::GetParameters(std::string store_name)
68
{
94
{
69
    StoreList::iterator it = this->stores_.find(store_name);
95
    StoreList::iterator it = this->stores_.find(store_name);