MRPT  1.9.9
CHierarchicalMHMap.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-2018, 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 CHierarchicalMHMap_H
10 #define CHierarchicalMHMap_H
11 
15 #include <mrpt/maps/CSimpleMap.h>
18 
19 namespace mrpt::hmtslam
20 {
21 /** The most high level class for storing hybrid, multi-hypothesis maps in a
22  * graph-based model.
23  * This class is used within the HMT-SLAM implementation in CHMTSLAM.
24  * \sa CHMTSLAM, CHMHMapArc, CHMHMapNode, CHierarchicalMHMapPartition
25  * \ingroup mrpt_hmtslam_grp
26  */
29 {
30  friend class CHMHMapArc;
31  friend class CHMHMapNode;
32 
34  protected:
35  /** Event handler to be called just after a node has being created: it will
36  * be added to the internal list.
37  */
38  void onNodeAddition(CHMHMapNode::Ptr& node);
39 
40  /** Event handler to be called just after an arc has being created: it will
41  * be added to the internal list.
42  */
43  void onArcAddition(CHMHMapArc::Ptr& arc);
44 
45  /** Event handler to be called just before a node is being destroyed: it
46  * will be removed from the internal list.
47  * \note At *addition we use a smart pointer to assure all the implied guys
48  * use the same smrt. pnt., but at destructors the objects don't know
49  * anything but "this", thus the usage of plain pointers.
50  */
51  void onNodeDestruction(CHMHMapNode* node);
52 
53  /** Event handler to be called just before an arc is being destroyed: it
54  * will be removed from the internal list.
55  * \note At *addition we use a smart pointer to assure all the implied guys
56  * use the same smrt. pnt., but at destructors the objects don't know
57  * anything but "this", thus the usage of plain pointers.
58  */
59  void onArcDestruction(CHMHMapArc* arc);
60 
61  public:
62  /** Default constructor
63  */
65 
66  /** Destructor
67  */
68 
69  /** Save the whole graph as a XML file */
70  void dumpAsXMLfile(std::string fileName) const;
71 
72  /** Load a graph from a XML file */
73  void loadFromXMLfile(std::string fileName);
74 
75  virtual ~CHierarchicalMHMap();
76 
77  /** Erase all the contents of map (It delete all nodes/arcs objects)
78  */
79  void clear();
80 
81 }; // End of class def.
82 
83 }
84 #endif
85 
86 
void onArcAddition(CHMHMapArc::Ptr &arc)
Event handler to be called just after an arc has being created: it will be added to the internal list...
Represents a set of nodes and arcs, posibly only a part of the whole hierarchical, multi-hypothesis map.
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
void onArcDestruction(CHMHMapArc *arc)
Event handler to be called just before an arc is being destroyed: it will be removed from the interna...
void onNodeDestruction(CHMHMapNode *node)
Event handler to be called just before a node is being destroyed: it will be removed from the interna...
void clear()
Erase all the contents of map (It delete all nodes/arcs objects)
void dumpAsXMLfile(std::string fileName) const
Destructor.
GLsizei const GLchar ** string
Definition: glext.h:4101
void loadFromXMLfile(std::string fileName)
Load a graph from a XML file.
void onNodeAddition(CHMHMapNode::Ptr &node)
Event handler to be called just after a node has being created: it will be added to the internal list...
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model...
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:30
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map...
Definition: CHMHMapArc.h:29
CHierarchicalMHMap()
Default constructor.
A class for representing a node in a hierarchical, multi-hypothesis map.
Definition: CHMHMapNode.h:34



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020