Add functions to enable edit of prod controls

This commit is contained in:
Stein Krogstad
2023-05-23 15:16:30 +02:00
parent 3411e1e0c6
commit 703431ce61

View File

@@ -38,6 +38,18 @@ public:
return (this->controls & static_cast<int>(cmode_arg)) != 0;
}
void skipControl(WellProducerCMode cmode_arg) {
auto int_arg = static_cast<int>(cmode_arg);
if ((this->controls & int_arg) != 0)
this->controls -= int_arg;
}
void addControl(WellProducerCMode cmode_arg) {
auto int_arg = static_cast<int>(cmode_arg);
if ((this->controls & int_arg) == 0)
this->controls += int_arg;
}
bool operator==(const WellProductionControls& other) const
{
return this->cmode == other.cmode &&