-SERVICE_CONF()
- : name(), comment(), cost(0), payDay(0)
-{}
-SERVICE_CONF(const std::string & n)
- : name(n), comment(), cost(0), payDay(0)
-{}
-SERVICE_CONF(const std::string & n, double c)
- : name(n), comment(), cost(c), payDay(0)
-{}
-SERVICE_CONF(const std::string & n, double c, unsigned p)
- : name(n), comment(), cost(c), payDay(p)
-{}
-SERVICE_CONF(const std::string & n, double c,
- unsigned p, const std::string & com)
- : name(n), comment(com), cost(c), payDay(p)
-{}
-
-std::string name;
-std::string comment;
-double cost;
-uint8_t payDay;
+ ServiceConf()
+ : cost(0), payDay(0)
+ {}
+ explicit ServiceConf(const std::string & n)
+ : name(n), cost(0), payDay(0)
+ {}
+ ServiceConf(const std::string & n, double c)
+ : name(n), cost(c), payDay(0)
+ {}
+ ServiceConf(const std::string & n, double c, unsigned p)
+ : name(n), cost(c), payDay(static_cast<uint8_t>(p))
+ {}
+ ServiceConf(const std::string & n, double c,
+ unsigned p, const std::string & com)
+ : name(n), comment(com), cost(c), payDay(static_cast<uint8_t>(p))
+ {}
+
+ ServiceConf(const ServiceConf&) = default;
+ ServiceConf& operator=(const ServiceConf&) = default;
+ ServiceConf(ServiceConf&&) = default;
+ ServiceConf& operator=(ServiceConf&&) = default;
+
+ bool operator==(const ServiceConf& rhs) const noexcept { return name == rhs.name; }
+
+ std::string name;
+ std::string comment;
+ double cost;
+ uint8_t payDay;