#ifndef CONFIG_H #define CONFIG_H #include #include #include /* pair */ class Config { public: enum Action { NONE, ON, OFF, PREVIOUS }; class Entry { public: Entry(const std::string & name); std::string name; int pin; Action on_start; Action on_exit; Action on_lock; Action on_unlock; protected: }; std::string port; std::vector entries; Config(); void read(const char * file); protected: void reset(); std::pair split(const std::string & line); Action parseAction(const std::string & str); }; #endif