Main MRPT website > C++ reference for 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
20 {
21 namespace hmtslam
22 {
23 /** The most high level class for storing hybrid, multi-hypothesis maps in a
24  * graph-based model.
25  * This class is used within the HMT-SLAM implementation in CHMTSLAM.
26  * \sa CHMTSLAM, CHMHMapArc, CHMHMapNode, CHierarchicalMHMapPartition
27  * \ingroup mrpt_hmtslam_grp
28  */
31 {
32  friend class CHMHMapArc;
33  friend class CHMHMapNode;
34 
36  protected:
37  /** Event handler to be called just after a node has being created: it will
38  * be added to the internal list.
39  */
40  void onNodeAddition(CHMHMapNode::Ptr& node);
41 
42  /** Event handler to be called just after an arc has being created: it will
43  * be added to the internal list.
44  */
45  void onArcAddition(CHMHMapArc::Ptr& arc);
46 
47  /** Event handler to be called just before a node is being destroyed: it
48  * will be removed from the internal list.
49  * \note At *addition we use a smart pointer to assure all the implied guys
50  * use the same smrt. pnt., but at destructors the objects don't know
51  * anything but "this", thus the usage of plain pointers.
52  */
53  void onNodeDestruction(CHMHMapNode* node);
54 
55  /** Event handler to be called just before an arc is being destroyed: it
56  * will be removed from the internal list.
57  * \note At *addition we use a smart pointer to assure all the implied guys
58  * use the same smrt. pnt., but at destructors the objects don't know
59  * anything but "this", thus the usage of plain pointers.
60  */
61  void onArcDestruction(CHMHMapArc* arc);
62 
63  public:
64  /** Default constructor
65  */
67 
68  /** Destructor
69  */
70 
71  /** Save the whole graph as a XML file */
72  void dumpAsXMLfile(std::string fileName) const;
73 
74  /** Load a graph from a XML file */
75  void loadFromXMLfile(std::string fileName);
76 
77  virtual ~CHierarchicalMHMap();
78 
79  /** Erase all the contents of map (It delete all nodes/arcs objects)
80  */
81  void clear();
82 
83 }; // End of class def.
84 
85 } // End of namespace
86 } // End of namespace
87 
88 #endif
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.
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...
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...
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:32
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map...
Definition: CHMHMapArc.h:31
CHierarchicalMHMap()
Default constructor.
A class for representing a node in a hierarchical, multi-hypothesis map.
Definition: CHMHMapNode.h:36



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019