allow constructing WellTestConfig from variables
also add accessor and equality operator
This commit is contained in:
@@ -57,6 +57,8 @@ public:
|
||||
};
|
||||
|
||||
WellTestConfig();
|
||||
WellTestConfig(const std::vector<WTESTWell>& well);
|
||||
|
||||
void add_well(const std::string& well, Reason reason, double test_interval, int num_test, double startup_time, int current_step);
|
||||
void add_well(const std::string& well, const std::string& reasons, double test_interval,
|
||||
int num_test, double startup_time, int current_step);
|
||||
@@ -66,8 +68,12 @@ public:
|
||||
const WTESTWell& get(const std::string& well, Reason reason) const;
|
||||
size_t size() const;
|
||||
|
||||
const std::vector<WTESTWell>& getWells() const;
|
||||
|
||||
static std::string reasonToString(const Reason reason);
|
||||
|
||||
bool operator==(const WellTestConfig& data) const;
|
||||
|
||||
private:
|
||||
std::vector<WTESTWell> wells;
|
||||
|
||||
|
||||
@@ -28,6 +28,12 @@ WellTestConfig::WellTestConfig() {
|
||||
|
||||
}
|
||||
|
||||
WellTestConfig::WellTestConfig(const std::vector<WTESTWell>& well)
|
||||
: wells(well)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void WellTestConfig::add_well(const std::string& well, Reason shut_reason, double test_interval,
|
||||
int num_retries, double startup_time, const int current_step) {
|
||||
|
||||
@@ -144,6 +150,18 @@ size_t WellTestConfig::size() const {
|
||||
return wells.size();
|
||||
}
|
||||
|
||||
|
||||
const std::vector<WellTestConfig::WTESTWell>& WellTestConfig::getWells() const {
|
||||
return wells;
|
||||
}
|
||||
|
||||
|
||||
bool WellTestConfig::operator==(const WellTestConfig& data) const {
|
||||
return this->getWells() == data.getWells();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user