- };
-
- DIRPRICE_DATA GetData()
- {
- DIRPRICE_DATA dd;
- dd.hDay = hDay;
- dd.hNight = hNight;
- dd.mDay = mDay;
- dd.mNight = mNight;
- dd.noDiscount = noDiscount;
- dd.priceDayA = priceDayA;
- dd.priceDayB = priceDayB;
-
- dd.priceNightA = priceNightA;
- dd.priceNightB = priceNightB;
- dd.singlePrice = singlePrice;
- dd.threshold = threshold;
- return dd;
- }
-
- RESETABLE<int> hDay;
- RESETABLE<int> mDay;
- RESETABLE<int> hNight;
- RESETABLE<int> mNight;
- RESETABLE<double> priceDayA;
- RESETABLE<double> priceNightA;
- RESETABLE<double> priceDayB;
- RESETABLE<double> priceNightB;
- RESETABLE<int> threshold;
- RESETABLE<int> singlePrice;
- RESETABLE<int> noDiscount;
+ }
+
+ void splice(const DirPriceDataOpt & rhs) noexcept
+ {
+ hDay.splice(rhs.hDay);
+ mDay.splice(rhs.mDay);
+ hNight.splice(rhs.hNight);
+ mNight.splice(rhs.mNight);
+ priceDayA.splice(rhs.priceDayA);
+ priceNightA.splice(rhs.priceNightA);
+ priceDayB.splice(rhs.priceDayB);
+ priceNightB.splice(rhs.priceNightB);
+ threshold.splice(rhs.threshold);
+ singlePrice.splice(rhs.singlePrice);
+ noDiscount.splice(rhs.noDiscount);
+ }
+
+ DirPriceData get(const DirPriceData& defaultValue) const noexcept
+ {
+ DirPriceData res;
+ res.hDay = hDay.get(defaultValue.hDay);
+ res.mDay = mDay.get(defaultValue.mDay);
+ res.hNight = hNight.get(defaultValue.hNight);
+ res.mNight = mNight.get(defaultValue.mNight);
+ res.priceDayA = priceDayA.get(defaultValue.priceDayA);
+ res.priceNightA = priceNightA.get(defaultValue.priceNightA);
+ res.priceDayB = priceDayB.get(defaultValue.priceDayB);
+ res.priceNightB = priceNightB.get(defaultValue.priceNightB);
+ res.threshold = threshold.get(defaultValue.threshold);
+ res.singlePrice = singlePrice.get(defaultValue.singlePrice);
+ res.noDiscount = noDiscount.get(defaultValue.noDiscount);
+ return res;
+ }
+
+ Optional<int> hDay;
+ Optional<int> mDay;
+ Optional<int> hNight;
+ Optional<int> mNight;
+ Optional<double> priceDayA;
+ Optional<double> priceNightA;
+ Optional<double> priceDayB;
+ Optional<double> priceNightB;
+ Optional<int> threshold;
+ Optional<int> singlePrice;
+ Optional<int> noDiscount;