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



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019