X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b7e15fb6292364ba19fba87d5415f44a4bb301a0..819c746b5b93ad2422dc12df64a042ce62583ee3:/include/stg/tariff_conf.h?ds=inline diff --git a/include/stg/tariff_conf.h b/include/stg/tariff_conf.h index 8640d823..cee3b4a5 100644 --- a/include/stg/tariff_conf.h +++ b/include/stg/tariff_conf.h @@ -204,6 +204,7 @@ struct TARIFF_CONF_RES passiveCost.maybeSet(tc.passiveCost); traffType.maybeSet(tc.traffType); period.maybeSet(tc.period); + changePolicy.maybeSet(tc.changePolicy); return tc; } @@ -213,6 +214,7 @@ struct TARIFF_CONF_RES RESETABLE passiveCost; RESETABLE name; RESETABLE period; + RESETABLE changePolicy; }; //----------------------------------------------------------------------------- struct TARIFF_DATA @@ -253,6 +255,14 @@ struct TARIFF_DATA_RES dirPrice(DIR_NUM) {} + TARIFF_DATA_RES & operator=(const TARIFF_DATA & td) + { + tariffConf = td.tariffConf; + for (size_t i = 0; i < DIR_NUM; ++i) + dirPrice[i] = td.dirPrice[i]; + return *this; + } + TARIFF_DATA GetData() const { TARIFF_DATA td;