Aikido
TestableOutcome.hpp
Go to the documentation of this file.
1 #ifndef AIKIDO_CONSTRAINT_TESTABLEOUTCOME_HPP_
2 #define AIKIDO_CONSTRAINT_TESTABLEOUTCOME_HPP_
3 
4 #include <string>
5 
6 namespace aikido {
7 namespace constraint {
8 
14 {
15 public:
17  virtual ~TestableOutcome() = default;
18 
21  virtual bool isSatisfied() const = 0;
22 
25  virtual std::string toString() const = 0;
26 };
27 
31 template <class Child>
32 Child* dynamic_cast_or_throw(TestableOutcome* outcome);
33 
34 } // namespace constraint
35 } // namespace aikido
36 
38 
39 #endif // AIKIDO_CONSTRAINT_TESTABLEOUTCOME_HPP_
aikido::constraint::dynamic_cast_or_throw
Child * dynamic_cast_or_throw(TestableOutcome *outcome)
Helper function.
Definition: TestableOutcome-impl.hpp:10
aikido
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
aikido::constraint::TestableOutcome::toString
virtual std::string toString() const =0
String representation of the outcome.
aikido::constraint::TestableOutcome
Base class for constraint outcomes.
Definition: TestableOutcome.hpp:13
aikido::constraint::TestableOutcome::isSatisfied
virtual bool isSatisfied() const =0
Returns true if isSatisfied call this outcome object was passed to returned true.
aikido::constraint::TestableOutcome::~TestableOutcome
virtual ~TestableOutcome()=default
Destructor.
TestableOutcome-impl.hpp