mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
output stream formatting for InterfaceState::Priority
This commit is contained in:
parent
a6fa45214f
commit
f7a94956c3
@ -135,6 +135,8 @@ private:
|
||||
Interface* owner_ = nullptr; // allow update of priority
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const InterfaceState::Priority& p);
|
||||
|
||||
/** Interface provides a cost-sorted list of InterfaceStates available as input for a stage. */
|
||||
class Interface : public ordered<InterfaceState*>
|
||||
{
|
||||
|
||||
@ -84,6 +84,10 @@ bool InterfaceState::Priority::operator<(const InterfaceState::Priority& other)
|
||||
return this->depth() > other.depth();
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const InterfaceState::Priority& p) {
|
||||
return os << "[depth: " << p.depth() << ", cost: " << p.cost() << "]";
|
||||
}
|
||||
|
||||
Interface::Interface(const Interface::NotifyFunction& notify) : notify_(notify) {}
|
||||
|
||||
// Announce a new InterfaceState
|
||||
|
||||
Loading…
Reference in New Issue
Block a user