Split Configuration into several classes

Each feature should handle its own configuration.
This commit is contained in:
pixl
2020-07-02 00:38:40 -04:00
parent 181be50f88
commit f6b93b94af
9 changed files with 154 additions and 519 deletions
+17
View File
@@ -20,13 +20,30 @@
#define LOGID_FEATURES_DEVICEFEATURE_H
namespace logid {
class Device;
namespace features
{
class DeviceFeature
{
public:
explicit DeviceFeature(Device* dev) : _device (dev)
{
}
virtual void configure() = 0;
virtual void listen() = 0;
class Config
{
public:
explicit Config(Device* dev) : _device (dev)
{
}
protected:
virtual const std::string configPath() = 0;
Device* _device;
std::string root_setting;
};
private:
Device* _device;
};
}}