fix comments + typos

This commit is contained in:
Robert Haschke 2019-03-10 23:26:53 +01:00
parent 7d25c55978
commit f831fe5483
3 changed files with 16 additions and 9 deletions

View File

@ -56,16 +56,22 @@ class StagePrivate {
friend std::ostream& operator<<(std::ostream& os, const StagePrivate& stage); friend std::ostream& operator<<(std::ostream& os, const StagePrivate& stage);
public: public:
// container type used to store children /// container type used to store children
typedef std::list<Stage::pointer> container_type; typedef std::list<Stage::pointer> container_type;
StagePrivate(Stage* me, const std::string& name); StagePrivate(Stage* me, const std::string& name);
virtual ~StagePrivate() = default; virtual ~StagePrivate() = default;
/// actually configured interface of this stage (only valid after init())
InterfaceFlags interfaceFlags() const; InterfaceFlags interfaceFlags() const;
// retrieve description of the interface required by this stage
// if this is unknown (because interface is auto-detected from context), return 0 /** Interface required by this stage
*
* If the interface is unknown (because it is auto-detected from context), return 0 */
virtual InterfaceFlags requiredInterface() const = 0; virtual InterfaceFlags requiredInterface() const = 0;
// prune interface to the given propagation direction
/** Prune interface to comply with the given propagation direction
*
* PropagatingEitherWay uses this in restrictDirection() */
virtual void pruneInterface(InterfaceFlags accepted) {} virtual void pruneInterface(InterfaceFlags accepted) {}
virtual bool canCompute() const = 0; virtual bool canCompute() const = 0;

View File

@ -367,8 +367,8 @@ SerialContainerPrivate::SerialContainerPrivate(SerialContainer *me, const std::s
: ContainerBasePrivate(me, name) : ContainerBasePrivate(me, name)
{} {}
// a serial container's required interface is derived from the required input interface // a serial container's required interface is derived from the actual input interface
// of the first child and the required output interface of the last child // of the first child and the actual output interface of the last child
InterfaceFlags SerialContainerPrivate::requiredInterface() const InterfaceFlags SerialContainerPrivate::requiredInterface() const
{ {
if (children().empty()) if (children().empty())
@ -424,7 +424,8 @@ void SerialContainer::init(const moveit::core::RobotModelConstPtr& robot_model)
impl->starts_.reset(); impl->starts_.reset();
impl->ends_.reset(); impl->ends_.reset();
ContainerBase::init(robot_model); // throws if there are no children // recursively init all children, throws if there are no children
ContainerBase::init(robot_model);
auto start = impl->children().begin(); auto start = impl->children().begin();
auto last = --impl->children().end(); auto last = --impl->children().end();
@ -582,7 +583,7 @@ void SerialContainer::validateConnectivity() const
// start pull interface fed? // start pull interface fed?
if (cur != impl->children().begin() && // first child has not a previous one if (cur != impl->children().begin() && // first child has not a previous one
(required & READS_START) && !(*prev)->pimpl()->nextStarts()) (required & READS_START) && !(*prev)->pimpl()->nextStarts())
errors.push_back(**cur, "end interface is not fed"); errors.push_back(**cur, "start interface is not fed");
// end pull interface fed? // end pull interface fed?
if (next != end && // last child has not a next one if (next != end && // last child has not a next one

View File

@ -519,7 +519,7 @@ void PropagatingEitherWay::init(const moveit::core::RobotModelConstPtr& robot_mo
// pretend that we offer both interface directions during init(). // pretend that we offer both interface directions during init().
// This is needed due to a chicken-egg-problem: interface auto-detection requires // This is needed due to a chicken-egg-problem: interface auto-detection requires
// the context (external pushing interfaces prevEnds, nextStarts) to be set, // the context (external pushing interfaces prevEnds, nextStarts) to be set,
// while the are ony set if we detected the correct interface... // while they are ony set if we detected the correct interface...
if (impl->required_interface_dirs_ == AUTO) if (impl->required_interface_dirs_ == AUTO)
impl->initInterface(BOTHWAY); impl->initInterface(BOTHWAY);
// otherwise the interface is already fixed and well-defined // otherwise the interface is already fixed and well-defined