Merge pull request #1015 from joakim-hove/actionx-restart

Actionx restart
This commit is contained in:
Joakim Hove
2019-09-18 16:45:24 +02:00
committed by GitHub
5 changed files with 203 additions and 55 deletions

View File

@@ -21,10 +21,28 @@
#define ACTIONX_CONDITION_HPP
#include <string>
#include <vector>
namespace Opm {
namespace Action {
class Quantity {
public:
Quantity() = default;
Quantity(const std::string& arg) :
quantity(arg)
{}
void add_arg(const std::string& arg);
std::string quantity;
std::vector<std::string> args;
};
class Condition {
public:
@@ -44,21 +62,14 @@ enum class Comparator {
};
void add_token(const std::string& token) {
if (!this->expression.empty())
this->expression += " ";
this->expression += token;
}
Condition(const std::string& quant) :
quantity(quant)
{}
Condition(const std::vector<std::string>& tokens, const std::pair<std::string, std::size_t>& location);
std::string expression;
std::string quantity;
Quantity lhs;
Quantity rhs;
Logical logic = Logical::END;
Comparator cmp = Comparator::INVALID;
std::string cmp_string;
};