hpp-manipulation  6.0.0
Classes for manipulation planning.
connected-component.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015 CNRS
3 // Authors: Anna Seppala (seppala@laas.fr)
4 //
5 
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are
8 // met:
9 //
10 // 1. Redistributions of source code must retain the above copyright
11 // notice, this list of conditions and the following disclaimer.
12 //
13 // 2. Redistributions in binary form must reproduce the above copyright
14 // notice, this list of conditions and the following disclaimer in the
15 // documentation and/or other materials provided with the distribution.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
28 // DAMAGE.
29 
30 #ifndef HPP_MANIPULATION_CONNECTED_COMPONENT_HH
31 #define HPP_MANIPULATION_CONNECTED_COMPONENT_HH
32 
33 #include <hpp/core/connected-component.hh>
35 #include <hpp/manipulation/fwd.hh>
37 
38 namespace hpp {
39 namespace manipulation {
44  : public core::ConnectedComponent {
45  public:
47  typedef std::map<graph::StatePtr_t, RoadmapNodes_t> GraphStates_t;
48 
50 
53  static ConnectedComponentPtr_t create(const RoadmapWkPtr_t& roadmap);
54 
59  void merge(const core::ConnectedComponentPtr_t& otherCC);
60 
63  void addNode(const core::NodePtr_t& node);
64 
66  const graph::StatePtr_t graphState) const;
67 
68  protected:
69  private:
70  bool check() const;
71  GraphStates_t graphStateMap_;
72  // a RoadmapWkPtr_t so that memory can be released ?
73  RoadmapWkPtr_t roadmap_;
74  static RoadmapNodes_t empty_;
75 
76  HPP_SERIALIZABLE();
77 }; // class ConnectedComponent
78 } // namespace manipulation
79 } // namespace hpp
80 #endif // HPP_MANIPULATION_CONNECTED_COMPONENT_HH
Definition: connected-component.hh:44
void merge(const core::ConnectedComponentPtr_t &otherCC)
const RoadmapNodes_t & getRoadmapNodes(const graph::StatePtr_t graphState) const
ConnectedComponent()
Definition: connected-component.hh:49
static ConnectedComponentPtr_t create(const RoadmapWkPtr_t &roadmap)
void addNode(const core::NodePtr_t &node)
std::map< graph::StatePtr_t, RoadmapNodes_t > GraphStates_t
Map of graph states within the connected component.
Definition: connected-component.hh:47
#define HPP_MANIPULATION_DLLAPI
Definition: config.hh:88
shared_ptr< State > StatePtr_t
Definition: fwd.hh:48
shared_ptr< ConnectedComponent > ConnectedComponentPtr_t
Definition: fwd.hh:73
std::vector< RoadmapNodePtr_t > RoadmapNodes_t
Definition: fwd.hh:71
Definition: main.hh:1