28 #ifndef YGGDRASILWM_CONFIGDATAGROUPS_HPP
29 #define YGGDRASILWM_CONFIGDATAGROUPS_HPP
31 #include "json/json.h"
33 #include <unordered_map>
51 void configInit(
const Json::Value& root)
override;
53 void addGroup(std::shared_ptr<ConfigDataGroup> group);
55 std::shared_ptr<ConfigDataGroup>
getGroup(
int index);
56 [[nodiscard]]
const std::vector<std::shared_ptr<ConfigDataGroup>> &
getGroups()
const;
59 std::vector<std::shared_ptr<ConfigDataGroup> >
groups_;
ConfigDataBase class header. This class is an interface for the ConfigData classes.
ConfigDataBase class This class is an interface for the ConfigData classes This is a pure virtual cla...
Definition: ConfigDataBase.hpp:38
ConfigDataGroup class Store the configuration for a group from the config file. the logic of groups i...
Definition: ConfigDataGroup.hpp:40
ConfigDataGroups class. stores an array of ConfigDataGroup created from the config file.
Definition: ConfigDataGroups.hpp:41
~ConfigDataGroups() override
Definition: ConfigDataGroups.cpp:59
void removeGroup(ConfigDataGroup *group)
Definition: ConfigDataGroups.cpp:50
void addGroup(std::shared_ptr< ConfigDataGroup > group)
Definition: ConfigDataGroups.cpp:49
const std::vector< std::shared_ptr< ConfigDataGroup > > & getGroups() const
Definition: ConfigDataGroups.cpp:58
ConfigDataGroups()
Definition: ConfigDataGroups.cpp:32
Json::Value configSave() override
Build a Json::Value object with the configuration.
Definition: ConfigDataGroups.cpp:45
void configInit(const Json::Value &root) override
Must be called after instanciation to load the config file. Parses the json root and creates ConfigDa...
Definition: ConfigDataGroups.cpp:33
std::vector< std::shared_ptr< ConfigDataGroup > > groups_
Definition: ConfigDataGroups.hpp:59
std::shared_ptr< ConfigDataGroup > getGroup(int index)
Definition: ConfigDataGroups.cpp:48