YggdrasilWM  0.1.1
A tiny window manager coded in C++
TSBarsData.hpp
Go to the documentation of this file.
1 
24 #ifndef TSBARSDATA_HPP
25 #define TSBARSDATA_HPP
26 #include <mutex>
27 #include <condition_variable>
28 #include <unordered_map>
29 #include <string>
30 #include <set>
32 {
33 public:
34  TSBarsData();
35  ~TSBarsData();
36  void addData(std::string key, std::string value);
37  std::unordered_map<std::string,std::string> getData();
38  void removeData(std::string key);
39  void modifyData(std::string key, std::string value);
40  bool wait();
41  bool dataChanged = false;
42 private:
43  std::mutex mutex;
44  std::condition_variable cv;
45  std::unordered_map<std::string, std::string> data;
46  std::set<std::string> modifiedKeys;
47 };
48 #endif // TSBARSDATA_HPP
Definition: TSBarsData.hpp:32
bool wait()
Definition: TSBarsData.cpp:63
void removeData(std::string key)
Definition: TSBarsData.cpp:47
std::unordered_map< std::string, std::string > data
Definition: TSBarsData.hpp:45
std::condition_variable cv
Definition: TSBarsData.hpp:44
std::mutex mutex
Definition: TSBarsData.hpp:43
~TSBarsData()
Definition: TSBarsData.cpp:30
bool dataChanged
Definition: TSBarsData.hpp:41
TSBarsData()
Definition: TSBarsData.cpp:29
std::unordered_map< std::string, std::string > getData()
Definition: TSBarsData.cpp:38
void modifyData(std::string key, std::string value)
Definition: TSBarsData.cpp:56
void addData(std::string key, std::string value)
Definition: TSBarsData.cpp:31
std::set< std::string > modifiedKeys
Definition: TSBarsData.hpp:46