mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
operator<< for Interface::Direction
This commit is contained in:
parent
ca38d11303
commit
5310f9063a
@ -248,6 +248,7 @@ private:
|
|||||||
|
|
||||||
std::ostream& operator<<(std::ostream& os, const InterfaceState::Priority& prio);
|
std::ostream& operator<<(std::ostream& os, const InterfaceState::Priority& prio);
|
||||||
std::ostream& operator<<(std::ostream& os, const Interface& interface);
|
std::ostream& operator<<(std::ostream& os, const Interface& interface);
|
||||||
|
std::ostream& operator<<(std::ostream& os, Interface::Direction);
|
||||||
|
|
||||||
/// Find index of the iterator in the container. Counting starts at 1. Zero corresponds to not found.
|
/// Find index of the iterator in the container. Counting starts at 1. Zero corresponds to not found.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@ -737,7 +737,6 @@ ConnectingPrivate::StatePair ConnectingPrivate::make_pair<Interface::FORWARD>(In
|
|||||||
return StatePair(second, first);
|
return StatePair(second, first);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: bool updated -> uint_8 updated (bitfield of PRIORITY | STATUS)
|
|
||||||
template <Interface::Direction dir>
|
template <Interface::Direction dir>
|
||||||
void ConnectingPrivate::newState(Interface::iterator it, Interface::UpdateFlags updated) {
|
void ConnectingPrivate::newState(Interface::iterator it, Interface::UpdateFlags updated) {
|
||||||
auto parent_pimpl = parent()->pimpl();
|
auto parent_pimpl = parent()->pimpl();
|
||||||
@ -799,8 +798,7 @@ void ConnectingPrivate::newState(Interface::iterator it, Interface::UpdateFlags
|
|||||||
#if 0
|
#if 0
|
||||||
auto& os = std::cerr;
|
auto& os = std::cerr;
|
||||||
for (auto d : { Interface::FORWARD, Interface::BACKWARD }) {
|
for (auto d : { Interface::FORWARD, Interface::BACKWARD }) {
|
||||||
bool fw = (d == Interface::FORWARD);
|
if (d == Interface::FORWARD)
|
||||||
if (fw)
|
|
||||||
os << " " << std::setw(10) << std::left << this->name();
|
os << " " << std::setw(10) << std::left << this->name();
|
||||||
else
|
else
|
||||||
os << std::setw(12) << std::right << "";
|
os << std::setw(12) << std::right << "";
|
||||||
@ -808,7 +806,7 @@ void ConnectingPrivate::newState(Interface::iterator it, Interface::UpdateFlags
|
|||||||
os << (updated ? " !" : " +");
|
os << (updated ? " !" : " +");
|
||||||
else
|
else
|
||||||
os << " ";
|
os << " ";
|
||||||
os << (fw ? "↓ " : "↑ ") << this->pullInterface(d) << ": " << *this->pullInterface(d) << std::endl;
|
os << d << " " << this->pullInterface(d) << ": " << *this->pullInterface(d) << std::endl;
|
||||||
}
|
}
|
||||||
os << std::setw(15) << " ";
|
os << std::setw(15) << " ";
|
||||||
printPendingPairs(os) << std::endl;
|
printPendingPairs(os) << std::endl;
|
||||||
|
|||||||
@ -178,6 +178,10 @@ std::ostream& operator<<(std::ostream& os, const InterfaceState::Priority& prio)
|
|||||||
<< InterfaceState::STATUS_COLOR[3];
|
<< InterfaceState::STATUS_COLOR[3];
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
std::ostream& operator<<(std::ostream& os, Interface::Direction dir) {
|
||||||
|
os << (dir == Interface::FORWARD ? "↓" : "↑");
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
void SolutionBase::setCreator(Stage* creator) {
|
void SolutionBase::setCreator(Stage* creator) {
|
||||||
assert(creator_ == nullptr || creator_ == creator); // creator must only set once
|
assert(creator_ == nullptr || creator_ == creator); // creator must only set once
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user