Main MRPT website > C++ reference
MRPT logo
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-2014, 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/slam/CSimpleMap.h>
18 
19 
20 namespace mrpt
21 {
22  namespace hmtslam
23  {
24  using namespace mrpt::slam;
25 
27 
28  /** The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model.
29  * This class is used within the HMT-SLAM implementation in CHMTSLAM.
30  * \sa CHMTSLAM, CHMHMapArc, CHMHMapNode, CHierarchicalMHMapPartition
31  * \ingroup mrpt_hmtslam_grp
32  */
34  {
35  friend class HMTSLAM_IMPEXP CHMHMapArc;
37 
38  // This must be added to any CSerializable derived class:
40  protected:
41  /** Event handler to be called just after a node has being created: it will be added to the internal list.
42  */
43  void onNodeAddition(CHMHMapNodePtr &node);
44 
45  /** Event handler to be called just after an arc has being created: it will be added to the internal list.
46  */
47  void onArcAddition(CHMHMapArcPtr &arc);
48 
49  /** Event handler to be called just before a node is being destroyed: it will be removed from the internal list.
50  * \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.
51  */
52  void onNodeDestruction(CHMHMapNode* node);
53 
54  /** Event handler to be called just before an arc is being destroyed: it will be removed from the internal list.
55  * \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.
56  */
57  void onArcDestruction(CHMHMapArc* arc);
58 
59  public:
60  /** Default constructor
61  */
63 
64  /** Destructor
65  */
66 
67  /** Save the whole graph as a XML file */
68  void dumpAsXMLfile(std::string fileName) const;
69 
70  /** Load a graph from a XML file */
71  void loadFromXMLfile(std::string fileName);
72 
73 
74  virtual ~CHierarchicalMHMap();
75 
76  /** Erase all the contents of map (It delete all nodes/arcs objects)
77  */
78  void clear();
79 
80  }; // End of class def.
81  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CHierarchicalMHMap, mrpt::utils::CSerializable, HMTSLAM_IMPEXP )
82 
83  } // End of namespace
84 } // End of namespace
85 
86 #endif
#define HMTSLAM_IMPEXP
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:35
STL namespace.
This namespace contains algorithms for SLAM, localization, map building, representation of robot's ac...
#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:21
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:30
#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:39



Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014