27 #ifndef YGGDRASILWM_CONFIGDATABARS_HPP
28 #define YGGDRASILWM_CONFIGDATABARS_HPP
31 #include "json/json.h"
35 #include <unordered_map>
62 void configInit(
const Json::Value& root_)
override;
73 std::shared_ptr<ConfigDataBar>
getBar(
int index);
78 void addBar(
const std::string& barName, std::shared_ptr<ConfigDataBar> bar);
89 [[nodiscard]]
const std::vector<std::shared_ptr<ConfigDataBar>> &
getBars()
const;
91 std::vector<std::shared_ptr<ConfigDataBar>>
bars_;
ConfigDataBase class header. This class is an interface for the ConfigData classes.
ConfigDataBar class Contains the configuration data for one bar in the window manager Inherits from C...
Definition: ConfigDataBar.hpp:41
ConfigDataBars class.
Definition: ConfigDataBars.hpp:42
void removeBar(int index)
Remove the Bar object at index.
Definition: ConfigDataBars.cpp:51
ConfigDataBars()
Construct a new ConfigDataBars object.
Definition: ConfigDataBars.cpp:32
std::vector< std::shared_ptr< ConfigDataBar > > bars_
Definition: ConfigDataBars.hpp:91
void addBar(const std::string &barName, std::shared_ptr< ConfigDataBar > bar)
Add a new Bar object to the ConfigDataBars object.
Definition: ConfigDataBars.cpp:50
std::shared_ptr< ConfigDataBar > getBar(int index)
Get the Bar object at index.
Definition: ConfigDataBars.cpp:49
const std::vector< std::shared_ptr< ConfigDataBar > > & getBars() const
Get the Bars object.
Definition: ConfigDataBars.cpp:52
~ConfigDataBars() override
Destroy the ConfigDataBars object.
Definition: ConfigDataBars.cpp:54
Json::Value configSave() override
return a Json::Value object containing the Bars configuration data
Definition: ConfigDataBars.cpp:46
void configInit(const Json::Value &root_) override
Initialize the ConfigDataBars object You must call configInit() in each ConfigDataBase Child class to...
Definition: ConfigDataBars.cpp:33
ConfigDataBase class This class is an interface for the ConfigData classes This is a pure virtual cla...
Definition: ConfigDataBase.hpp:38