hpp-manipulation  4.12.0
Classes for manipulation planning.
roadmap-node.hh
Go to the documentation of this file.
1 // Copyright (c) 2014 CNRS
2 // Authors: Joseph Mirabel
3 //
4 //
5 // This file is part of hpp-manipulation.
6 // hpp-manipulation is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-manipulation is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-manipulation. If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_MANIPULATION_ROADMAP_NODE_HH
20 # define HPP_MANIPULATION_ROADMAP_NODE_HH
21 
22 # include <hpp/core/node.hh>
23 
24 # include <hpp/manipulation/fwd.hh>
29 
30 namespace hpp {
31  namespace manipulation {
32  class HPP_MANIPULATION_DLLAPI RoadmapNode : public core::Node
33  {
34  public:
35  RoadmapNode (const ConfigurationPtr_t& configuration) :
36  core::Node (configuration),
37  state_ ()
38  {}
39 
40  RoadmapNode (const ConfigurationPtr_t& configuration,
42 
45 
47  bool cacheUpToDate () const
48  {
49  return static_cast<bool>(graphState());
50  }
51 
54  {
55  return state_.lock();
56  }
57 
59  void graphState (const graph::StatePtr_t& state)
60  {
61  state_ = state;
62  }
64 
66  {
67  leafCC_ = sc;
68  }
69 
71  {
72  return leafCC_;
73  }
74 
75  private:
76  graph::StateWkPtr_t state_;
77  LeafConnectedCompPtr_t leafCC_;
78 
79  RoadmapNode() {}
80  HPP_SERIALIZABLE();
81  };
82  } // namespace manipulation
83 } // namespace hpp
84 
85 #endif // HPP_MANIPULATION_ROADMAP_NODE_HH
void leafConnectedComponent(const LeafConnectedCompPtr_t &sc)
Definition: roadmap-node.hh:65
Definition: main.hh:1
shared_ptr< ConnectedComponent > ConnectedComponentPtr_t
Definition: fwd.hh:63
#define HPP_MANIPULATION_DLLAPI
Definition: config.hh:64
RoadmapNode(const ConfigurationPtr_t &configuration)
Definition: roadmap-node.hh:35
graph::StatePtr_t graphState() const
Getter for the graph::State.
Definition: roadmap-node.hh:53
shared_ptr< LeafConnectedComp > LeafConnectedCompPtr_t
Definition: fwd.hh:65
LeafConnectedCompPtr_t leafConnectedComponent() const
Definition: roadmap-node.hh:70
shared_ptr< State > StatePtr_t
Definition: fwd.hh:36
void graphState(const graph::StatePtr_t &state)
Setter for the graph::State.
Definition: roadmap-node.hh:59
bool cacheUpToDate() const
Get the caching system being used.
Definition: roadmap-node.hh:47
Definition: roadmap-node.hh:32
core::ConfigurationPtr_t ConfigurationPtr_t
Definition: fwd.hh:40