- }
-
- DIRPRICE_DATA GetData() const
- {
- DIRPRICE_DATA dd;
- dd.hDay = hDay.data();
- dd.hNight = hNight.data();
- dd.mDay = mDay.data();
- dd.mNight = mNight.data();
- dd.noDiscount = noDiscount.data();
- dd.priceDayA = priceDayA.data();
- dd.priceDayB = priceDayB.data();
-
- dd.priceNightA = priceNightA.data();
- dd.priceNightB = priceNightB.data();
- dd.singlePrice = singlePrice.data();
- dd.threshold = threshold.data();
- 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;