1 #include "command.hpp"
\r
5 std::string command::name() const
\r
10 bool command::enabled() const
\r
15 std::string command::handler() const
\r
20 void command::from_json(const nlohmann::json& j)
\r
22 name_ = j.count("name") ? j["name"].get<std::string>() : "";
\r
23 enabled_ = j.count("enabled") ? j["enabled"].get<bool>() : true;
\r
24 handler_ = j.count("handler") ? j["handler"].get<std::string>() : "";
\r
27 nlohmann::json command::to_json() const
\r
31 j["enabled"] = enabled_;
\r
32 j["handler"] = handler_;
\r
36 void to_json(nlohmann::json& j, const command& p)
\r
41 void from_json(const nlohmann::json& j, command& p)
\r