Main MRPT website > C++ reference for MRPT 1.4.0
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-2016, 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  */
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  */
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 
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
mrpt::hmtslam::CHierarchicalMHMap::onArcAddition
void onArcAddition(CHMHMapArcPtr &arc)
Event handler to be called just after an arc has being created: it will be added to the internal list...
mrpt::hmtslam::CHierarchicalMHMap::onNodeDestruction
void onNodeDestruction(CHMHMapNode *node)
Event handler to be called just before a node is being destroyed: it will be removed from the interna...
CHMHMapNode.h
mrpt::hmtslam::CHMHMapNode
A class for representing a node in a hierarchical, multi-hypothesis map.
Definition: CHMHMapNode.h:38
mrpt::hmtslam::CHierarchicalMHMap::loadFromXMLfile
void loadFromXMLfile(std::string fileName)
Load a graph from a XML file.
CHierarchicalMapMHPartition.h
mrpt::hmtslam::CHierarchicalMHMap::onNodeAddition
void onNodeAddition(CHMHMapNodePtr &node)
Event handler to be called just after a node has being created: it will be added to the internal list...
CSimpleMap.h
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CParticleFilter.h:17
CMultiMetricMap.h
mrpt::hmtslam::CHierarchicalMHMap::clear
void clear()
Erase all the contents of map (It delete all nodes/arcs objects)
mrpt::hmtslam::CHierarchicalMHMap::~CHierarchicalMHMap
virtual ~CHierarchicalMHMap()
mrpt::hmtslam::CHierarchicalMHMap::dumpAsXMLfile
void dumpAsXMLfile(std::string fileName) const
Destructor.
DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
Definition: CSerializable.h:174
mrpt::utils::CSerializable
The virtual base class which provides a unified interface for all persistent objects in MRPT.
Definition: CSerializable.h:40
HMTSLAM_IMPEXP
#define HMTSLAM_IMPEXP
Definition: hmtslam_impexp.h:81
DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE
#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...
Definition: CSerializable.h:170
mrpt::hmtslam::CHMHMapArc
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map.
Definition: CHMHMapArc.h:30
CHMHMapArc.h
mrpt::hmtslam::CHierarchicalMHMap::onArcDestruction
void onArcDestruction(CHMHMapArc *arc)
Event handler to be called just before an arc is being destroyed: it will be removed from the interna...
DEFINE_SERIALIZABLE
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Definition: CSerializable.h:147
mrpt::hmtslam::CHierarchicalMHMap::CHierarchicalMHMap
CHierarchicalMHMap()
Default constructor.
CSerializable.h
mrpt::hmtslam::CHierarchicalMHMap
The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model.
Definition: CHierarchicalMHMap.h:32
mrpt::hmtslam::CHierarchicalMapMHPartition
Represents a set of nodes and arcs, posibly only a part of the whole hierarchical,...
Definition: CHierarchicalMapMHPartition.h:35



Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020