mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
Switch order of function declarations
... to avoid explicit template initialization
This commit is contained in:
parent
52dc494525
commit
1dda3d14d8
@ -109,29 +109,6 @@ void ContainerBasePrivate::compute() {
|
|||||||
static_cast<ContainerBase*>(me_)->compute();
|
static_cast<ContainerBase*>(me_)->compute();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContainerBasePrivate::onNewFailure(const Stage& child, const InterfaceState* from, const InterfaceState* to) {
|
|
||||||
ROS_DEBUG_STREAM_NAMED("Pruning", "'" << child.name() << "' generated a failure");
|
|
||||||
switch (child.pimpl()->interfaceFlags()) {
|
|
||||||
case GENERATE:
|
|
||||||
// just ignore: the pair of (new) states isn't known to us anyway
|
|
||||||
// TODO: If child is a container, from and to might have associated solutions already!
|
|
||||||
break;
|
|
||||||
|
|
||||||
case PROPAGATE_FORWARDS: // mark from as failed (backwards)
|
|
||||||
setStatus<Interface::BACKWARD>(nullptr, nullptr, from, InterfaceState::Status::FAILED);
|
|
||||||
break;
|
|
||||||
case PROPAGATE_BACKWARDS: // mark to as failed (forwards)
|
|
||||||
setStatus<Interface::FORWARD>(nullptr, nullptr, to, InterfaceState::Status::FAILED);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CONNECT:
|
|
||||||
setStatus<Interface::BACKWARD>(&child, to, from, InterfaceState::Status::FAILED);
|
|
||||||
setStatus<Interface::FORWARD>(&child, from, to, InterfaceState::Status::FAILED);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// printChildrenInterfaces(*this, false, child);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <Interface::Direction dir>
|
template <Interface::Direction dir>
|
||||||
void ContainerBasePrivate::setStatus(const Stage* creator, const InterfaceState* source, const InterfaceState* target,
|
void ContainerBasePrivate::setStatus(const Stage* creator, const InterfaceState* source, const InterfaceState* target,
|
||||||
InterfaceState::Status status) {
|
InterfaceState::Status status) {
|
||||||
@ -189,6 +166,29 @@ void ContainerBasePrivate::setStatus(const Stage* creator, const InterfaceState*
|
|||||||
setStatus<dir>(successor->creator(), target, state<dir>(*successor), status);
|
setStatus<dir>(successor->creator(), target, state<dir>(*successor), status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ContainerBasePrivate::onNewFailure(const Stage& child, const InterfaceState* from, const InterfaceState* to) {
|
||||||
|
ROS_DEBUG_STREAM_NAMED("Pruning", "'" << child.name() << "' generated a failure");
|
||||||
|
switch (child.pimpl()->interfaceFlags()) {
|
||||||
|
case GENERATE:
|
||||||
|
// just ignore: the pair of (new) states isn't known to us anyway
|
||||||
|
// TODO: If child is a container, from and to might have associated solutions already!
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PROPAGATE_FORWARDS: // mark from as failed (backwards)
|
||||||
|
setStatus<Interface::BACKWARD>(nullptr, nullptr, from, InterfaceState::Status::FAILED);
|
||||||
|
break;
|
||||||
|
case PROPAGATE_BACKWARDS: // mark to as failed (forwards)
|
||||||
|
setStatus<Interface::FORWARD>(nullptr, nullptr, to, InterfaceState::Status::FAILED);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CONNECT:
|
||||||
|
setStatus<Interface::BACKWARD>(&child, to, from, InterfaceState::Status::FAILED);
|
||||||
|
setStatus<Interface::FORWARD>(&child, from, to, InterfaceState::Status::FAILED);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// printChildrenInterfaces(*this, false, child);
|
||||||
|
}
|
||||||
|
|
||||||
template <Interface::Direction dir>
|
template <Interface::Direction dir>
|
||||||
void ContainerBasePrivate::copyState(Interface::iterator external, const InterfacePtr& target, bool updated) {
|
void ContainerBasePrivate::copyState(Interface::iterator external, const InterfacePtr& target, bool updated) {
|
||||||
if (updated) { // propagate external state update to internal copies
|
if (updated) { // propagate external state update to internal copies
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user