Main MRPT website > C++ reference for MRPT 1.9.9
CHMHMapArc.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CHMHMapArc_H
10 #define CHMHMapArc_H
11 
12 #include <mrpt/obs/CSensoryFrame.h>
15 
16 namespace mrpt
17 {
18 namespace hmtslam
19 {
20 class CHierarchicalMHMap;
21 
22 /** A class for representing an arc between two nodes in a hierarchical,
23  * multi-hypothesis map.
24  * The arc itself will be considered only if some given hypothesisID matchs
25  * its own ID.
26  * \note Create objects by invoking the class factory "::Create"
27  *
28  * \sa CHierarchicalMHMap,CHMHMapNode
29  * \ingroup mrpt_hmtslam_grp
30  */
32 {
33  friend class CHierarchicalMHMap;
34  friend class CHMHMapNode;
36  friend class TArcList;
37 
39 
40  public:
41  /** The hypothesis IDs under which this arc exists.
42  */
44 
45  protected:
46  /** The origin/target nodes for this arc.
47  */
49 
50  /** The hierarchical graph in which this object is into. */
52 
53  /** Event handler to be called just before a node is being destroyed: it
54  * should be called only for nodes involved in the arc, altought other cases
55  * must be handled without effects
56  * When a node involved in the arc is delected, the corresponding pointer
57  * in the arc will be set to nullptr and the arc is no longer a valid one.
58  */
59  void onNodeDestruction(CHMHMapNode* node);
60 
61  public:
62  /** Private constructor (see ::Create class factory)
63  */
64  CHMHMapArc(
65  const CHMHMapNode::TNodeID& from = 0,
66  const CHMHMapNode::TNodeID& to = 0,
67  const THypothesisIDSet& hyps = THypothesisIDSet(),
68  CHierarchicalMHMap* parent = nullptr);
69 
70  /** Alternative constructor, using pointers for convenience.
71  */
72  CHMHMapArc(
74  const THypothesisIDSet& hyps, CHierarchicalMHMap* parent);
75 
76  /** Destructor
77  */
78  virtual ~CHMHMapArc();
79 
80  /** Return the starting node of the arc:
81  */
83  {
85  return m_nodeFrom;
86  }
87 
88  /** Return the ending node of the arc:
89  */
91  {
93  return m_nodeTo;
94  }
95 
96  /** The type of the arc, the possibilities are:
97  - "Membership": for abstractions
98  - "Navegability"
99  - "RelativePose"
100  */
102 
103  /** The annotations of the arc, see the general description of the class for
104  * possible properties and values.
105  */
107 
108 }; // End of class def.
109 
110 } // End of namespace
111 } // End of namespace
112 
113 #endif
THypothesisIDSet m_hypotheses
The hypothesis IDs under which this arc exists.
Definition: CHMHMapArc.h:43
An arbitrary list of "annotations", or named attributes, each being an instance of any CSerializable ...
Represents a set of nodes and arcs, posibly only a part of the whole hierarchical, multi-hypothesis map.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:44
utils::CMHPropertiesValuesList m_annotations
The annotations of the arc, see the general description of the class for possible properties and valu...
Definition: CHMHMapArc.h:106
CHMHMapNode::TNodeID m_nodeTo
Definition: CHMHMapArc.h:48
#define AREAID_INVALID
utils::CTypeSelector m_arcType
The type of the arc, the possibilities are:
Definition: CHMHMapArc.h:101
CHMHMapNode::TNodeID getNodeFrom() const
Return the starting node of the arc:
Definition: CHMHMapArc.h:82
CHMHMapNode::TNodeID m_nodeFrom
The origin/target nodes for this arc.
Definition: CHMHMapArc.h:48
A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps. ...
CHMHMapArc(const CHMHMapNode::TNodeID &from=0, const CHMHMapNode::TNodeID &to=0, const THypothesisIDSet &hyps=THypothesisIDSet(), CHierarchicalMHMap *parent=nullptr)
Private constructor (see ::Create class factory)
Definition: CHMHMapArc.cpp:21
virtual ~CHMHMapArc()
Destructor.
Definition: CHMHMapArc.cpp:59
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
This class represents a std::string derived class which is also CSerializable.
Definition: CTypeSelector.h:23
The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model...
#define ASSERT_(f)
std::shared_ptr< CHMHMapNode > Ptr
Definition: CHMHMapNode.h:42
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map...
Definition: CHMHMapArc.h:31
A class for storing a sequence of arcs (a path).
A class for representing a node in a hierarchical, multi-hypothesis map.
Definition: CHMHMapNode.h:36
A wrapper class for pointers that can be safely copied with "=" operator without problems.
Definition: safe_pointers.h:75
mrpt::utils::safe_ptr< CHierarchicalMHMap > m_parent
The hierarchical graph in which this object is into.
Definition: CHMHMapArc.h:51
mrpt::utils::TNodeID TNodeID
The type of the IDs of nodes.
Definition: CHMHMapNode.h:47
CHMHMapNode::TNodeID getNodeTo() const
Return the ending node of the arc:
Definition: CHMHMapArc.h:90
void onNodeDestruction(CHMHMapNode *node)
Event handler to be called just before a node is being destroyed: it should be called only for nodes ...
Definition: CHMHMapArc.cpp:74



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019