hpp-core  4.10.1
Implement basic classes for canonical path planning for kinematic chains.
edge.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 CNRS
3 // Authors: Florent Lamiraux
4 //
5 // This file is part of hpp-core
6 // hpp-core 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-core 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-core If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_CORE_EDGE_HH
20 # define HPP_CORE_EDGE_HH
21 
22 # include <hpp/core/config.hh>
23 # include <hpp/core/fwd.hh>
24 # include <hpp/util/serialization-fwd.hh>
25 
26 namespace hpp {
27  namespace core {
30 
36  {
37  public:
38  Edge (NodePtr_t n1, NodePtr_t n2, const PathPtr_t& path) :
39  n1_ (n1), n2_ (n2), path_ (path)
40  {
41  }
42  NodePtr_t from () const
43  {
44  return n1_;
45  }
46  NodePtr_t to () const
47  {
48  return n2_;
49  }
50  PathPtr_t path () const
51  {
52  return path_;
53  }
54 
55  protected:
56  Edge() {}
57  private:
58  NodePtr_t n1_;
59  NodePtr_t n2_;
60  PathPtr_t path_;
61 
62  HPP_SERIALIZABLE();
63  }; // class Edge
65  } // namespace core
66 } // namespace hpp
67 #endif // HPP_CORE_EDGE_HH
boost::shared_ptr< Path > PathPtr_t
Definition: fwd.hh:170
PathPtr_t path() const
Definition: edge.hh:50
Edge(NodePtr_t n1, NodePtr_t n2, const PathPtr_t &path)
Definition: edge.hh:38
Definition: basic-configuration-shooter.hh:26
Definition: edge.hh:35
NodePtr_t to() const
Definition: edge.hh:46
Definition: node.hh:35
#define HPP_CORE_DLLAPI
Definition: config.hh:64
NodePtr_t from() const
Definition: edge.hh:42
Edge()
Definition: edge.hh:56