Control Libraries 7.4.0
Loading...
Searching...
No Matches
Predicate.cpp
1#include "state_representation/parameters/Predicate.hpp"
2
3namespace state_representation {
4
5Predicate::Predicate(const std::string& name) : Parameter<bool>(name, false) {}
6
7Predicate::Predicate(const std::string& name, bool value) : Parameter<bool>(name, value) {}
8
9std::ostream& operator<<(std::ostream& os, const Predicate& predicate) {
10 os << "Predicate '" << predicate.get_name() << "': " << predicate.get_value();
11 return os;
12}
13}// namespace state_representation
Class to represent name-value pairs of different types.
Definition Parameter.hpp:18
U get_value() const
Getter of the value attribute.
A predicate is a boolean parameter as in the logic formalism.
Definition Predicate.hpp:11
Predicate(const std::string &name)
Constructor with name of the predicate and default false value.
Definition Predicate.cpp:5
const std::string & get_name() const
Getter of the name attribute.
Definition State.cpp:29
Core state variables and objects.
std::ostream & operator<<(std::ostream &os, const AnalogIOState &state)