20 #ifndef ACTION_RESULT_HPP 21 #define ACTION_RESULT_HPP 86 using RandIt =
typename std::vector<T>::const_iterator;
102 , isSorted_ { isSorted }
106 auto begin()
const {
return this->first_; }
109 auto end()
const {
return this->last_; }
115 auto size()
const {
return std::distance(this->
begin(), this->
end()); }
122 return { this->
begin(), this->
end() };
132 return this->isSorted_
133 ? this->hasElementSorted(elem)
134 : this->hasElementUnsorted(elem);
145 bool isSorted_{
false};
152 bool hasElementSorted(
const T& elem)
const 154 return std::ranges::binary_search(*
this, elem);
162 bool hasElementUnsorted(
const T& elem)
const 164 return std::ranges::find(*
this, elem) != this->
end();
222 bool hasWell(
const std::string& well)
const;
240 std::unique_ptr<Impl> pImpl_;
248 void addWell(
const std::string& well);
256 void addWells(
const std::vector<std::string>& wells);
287 explicit Result(
bool result_arg);
327 Result& wells(
const std::vector<std::string>& w);
333 bool conditionSatisfied()
const;
384 std::unique_ptr<Impl> pImpl_;
389 #endif // ACTION_RESULT_HPP MatchingEntities()
Default constructor.
Definition: ActionResult.cpp:491
Definition: Python.hpp:35
auto end() const
End of value range's elements.
Definition: ActionResult.hpp:109
Container of matching entities.
Definition: ActionResult.hpp:172
const MatchingEntities & matches() const
Retrieve set of matching entities.
Definition: ActionResult.cpp:716
~MatchingEntities()
Destructor.
Result & makeSetUnion(const Result &rhs)
Assignment operator.
Definition: ActionResult.cpp:702
std::vector< T > asVector() const
Convert value range to a std::vector.
Definition: ActionResult.hpp:120
Implementation of Action::Result.
Definition: ActionResult.cpp:565
Result(bool result_arg)
Constructor.
Definition: ActionResult.cpp:661
auto empty() const
Predicate for an empty value range.
Definition: ActionResult.hpp:112
bool operator==(const Result &that) const
Equality predicate.
Definition: ActionResult.cpp:721
bool hasElement(const T &elem) const
Element existence predicate.
Definition: ActionResult.hpp:130
auto size() const
Number of elements in the value range.
Definition: ActionResult.hpp:115
typename std::vector< T >::const_iterator RandIt
Random access iterator.
Definition: ActionResult.hpp:86
Implementation of Result::MatchingEntities.
Definition: ActionResult.cpp:348
auto begin() const
Beginning of value range's elements.
Definition: ActionResult.hpp:106
bool operator==(const MatchingEntities &that) const
Assignment operator.
Definition: ActionResult.cpp:531
Random access range of values.
Definition: ActionResult.hpp:79
ValueRange(RandIt first, RandIt last, bool isSorted=false)
Constructor.
Definition: ActionResult.hpp:99
Result & makeSetIntersection(const Result &rhs)
Incorporate another result set into the current set as if by set intersection.
Definition: ActionResult.cpp:709
Class Action::Result holds the boolean result of a ACTIONX condition like.
Definition: ActionResult.hpp:68