Skip to content

Commit

Permalink
[#5] Empty config declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
kmicki committed Jun 24, 2022
1 parent 649e2d1 commit afab9f3
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 13 deletions.
36 changes: 36 additions & 0 deletions inc/cemuhook/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#ifndef _KMICKI_CEMUHOOK_CONFIG_H_
#define _KMICKI_CEMUHOOK_CONFIG_H_

#include "config/config.h"

namespace kmicki::cemuhook
{
typedef config::ConfigItemBase ConfigItemBase;
template<class T>
using ConfigItem = config::ConfigItem<T>;

enum ConfigInterface
{
CfgIfLocal = 0,
CfgIfAll
};

class Config : public config::Config
{
public:
Config() = delete;
Config(std::vector<std::unique_ptr<ConfigItemBase>> & _configData);

ConfigInterface const& Interface() const;
int const& Port() const;

virtual void Load();
virtual void Save();

private:
ConfigInterface interface;
int port;
};
}

#endif
13 changes: 0 additions & 13 deletions inc/hiddev/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,14 @@ namespace kmicki::hiddev
template<class T>
using ConfigItem = config::ConfigItem<T>;

enum ConfigInterface
{
CfgIfLocal = 0,
CfgIfAll
};

class Config : public config::Config
{
public:
Config() = delete;
Config(std::vector<std::unique_ptr<ConfigItemBase>> & _configData);

ConfigInterface const& Interface() const;
int const& Port() const;

virtual void Load();
virtual void Save();

private:
ConfigInterface interface;
int port;
};
}

Expand Down
23 changes: 23 additions & 0 deletions inc/sdgyrodsu/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#ifndef _KMICKI_SDGYRODSU_CONFIG_H_
#define _KMICKI_SDGYRODSU_CONFIG_H_

#include "config/config.h"

namespace kmicki::sdgyrodsu
{
typedef config::ConfigItemBase ConfigItemBase;
template<class T>
using ConfigItem = config::ConfigItem<T>;

class Config : public config::Config
{
public:
Config() = delete;
Config(std::vector<std::unique_ptr<ConfigItemBase>> & _configData);

virtual void Load();
virtual void Save();
};
}

#endif

0 comments on commit afab9f3

Please sign in to comment.