X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/ae21e8d6ad32d0bf3517127aef5cd8129b7507aa..aa3ae79d6899ea3c23ba43f28ffe4fb4bb6001bd:/include/stg/service_conf.h diff --git a/include/stg/service_conf.h b/include/stg/service_conf.h index 473830e4..a9b8d5c4 100644 --- a/include/stg/service_conf.h +++ b/include/stg/service_conf.h @@ -22,16 +22,16 @@ #define SERVICE_CONF_H #include "resetable.h" -#include "os_int.h" #include +#include struct SERVICE_CONF { SERVICE_CONF() : name(), comment(), cost(0), payDay(0) {} -SERVICE_CONF(const std::string & n) +explicit SERVICE_CONF(const std::string & n) : name(n), comment(), cost(0), payDay(0) {} SERVICE_CONF(const std::string & n, double c) @@ -58,6 +58,11 @@ SERVICE_CONF_RES() cost(), payDay() {} +explicit SERVICE_CONF_RES(const SERVICE_CONF & rhs) + : name(rhs.name), comment(rhs.comment), + cost(rhs.cost), payDay(rhs.payDay) +{} + SERVICE_CONF_RES & operator=(const SERVICE_CONF & conf) { name = conf.name; @@ -77,6 +82,14 @@ sc.payDay = payDay.data(); return sc; } +void Splice(const SERVICE_CONF_RES & rhs) +{ +name.splice(rhs.name); +comment.splice(rhs.comment); +cost.splice(rhs.cost); +payDay.splice(rhs.payDay); +} + RESETABLE name; RESETABLE comment; RESETABLE cost;