]> git.stg.codes - stg.git/blobdiff - include/stg/tariff_conf.h
Ticket 37. TARIFF_DATA_RES & operator=(const TARIFF_DATA & td) added in
[stg.git] / include / stg / tariff_conf.h
index 7790d47bf470ea03f6a0d06b580feca650147ec1..9de3083042cd5f55ddc839c6174590d655c4d066 100644 (file)
@@ -179,7 +179,8 @@ struct TARIFF_CONF_RES
           traffType(),
           passiveCost(),
           name(),
-          period()
+          period(),
+          changePolicy()
         {}
 
     TARIFF_CONF_RES & operator=(const TARIFF_CONF & tc)
@@ -190,6 +191,7 @@ struct TARIFF_CONF_RES
         passiveCost = tc.passiveCost;
         name        = tc.name;
         period      = tc.period;
+        changePolicy = tc.changePolicy;
         return *this;
         }
 
@@ -202,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;
         }
 
@@ -211,6 +214,7 @@ struct TARIFF_CONF_RES
     RESETABLE<double>             passiveCost;
     RESETABLE<std::string>        name;
     RESETABLE<TARIFF::PERIOD>     period;
+    RESETABLE<TARIFF::CHANGE_POLICY> changePolicy;
 };
 //-----------------------------------------------------------------------------
 struct TARIFF_DATA
@@ -251,6 +255,12 @@ struct TARIFF_DATA_RES
           dirPrice(DIR_NUM)
         {}
 
+    TARIFF_DATA_RES & operator=(const TARIFF_DATA & td)
+        {
+        tariffConf = td.tariffConf;
+        return *this;
+        }
+
     TARIFF_DATA GetData() const
         {
         TARIFF_DATA td;