RoadmapNode.cpp
Go to the documentation of this file.
1 #include "RoadmapNode.h"
2 
3 using namespace PathEngine;
4 
6 {
7  if (index >= parents_.size()) return RoadmapNodePtr();
8  return parents_[index];
9 }
10 
12 {
13  if (index >= children_.size()) return RoadmapNodePtr();
14  return children_[index];
15 }
16 
18 {
19  std::vector<RoadmapNodePtr>::iterator it
20  = find(parents_.begin(), parents_.end(), node);
21  if (it != parents_.end()){
22  parents_.erase(it);
23  return true;
24  }else{
25  return false;
26  }
27 }
28 
30 {
31  std::vector<RoadmapNodePtr>::iterator it
32  = find(children_.begin(), children_.end(), node);
33  if (it != children_.end()){
34  children_.erase(it);
35  return true;
36  }else{
37  return false;
38  }
39 }
40 
RoadmapNodePtr parent(unsigned int index)
親ノードの取得
Definition: RoadmapNode.cpp:5
boost::shared_ptr< RoadmapNode > RoadmapNodePtr
Definition: RoadmapNode.h:11
CORBA::Long find(const CorbaSequence &seq, Functor f)
std::vector< RoadmapNodePtr > children_
子ノードリスト
Definition: RoadmapNode.h:108
std::vector< RoadmapNodePtr > parents_
親ノードリスト
Definition: RoadmapNode.h:103
bool removeParent(RoadmapNodePtr node)
親ノードの削除
Definition: RoadmapNode.cpp:17
RoadmapNodePtr child(unsigned int index)
子ノードの取得
Definition: RoadmapNode.cpp:11
bool removeChild(RoadmapNodePtr node)
子ノードの削除
Definition: RoadmapNode.cpp:29


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Sep 8 2022 02:24:05