39 CHMHMapArc::CHMHMapArc(
64 node->onArcDestruction(
this);
107 if (it->get() ==
this)
113 ASSERTMSG_(myPtr,
"I cannot be found in my parent HMT map!");
122 node->onArcAddition(myPtr);
124 node->onArcAddition(myPtr);
137 printf(
"Dumping arcs list: %u elements\n", (
unsigned int)
size());
142 (*i)->m_parent->getNodeByID((*i)->getNodeFrom())->m_label.c_str(),
143 (*i)->m_parent->getNodeByID((*i)->getNodeTo())->m_label.c_str());
152 for (i = 0; i <
n; i++)
161 out << static_cast<uint32_t>(this->
size());
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
#define ARC_TYPES
Used in constructor of mrpt::hmtslam::CHMHMapArc.
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map.
CMHPropertiesValuesList m_annotations
The annotations of the arc, see the general description of the class for possible properties and valu...
THypothesisIDSet m_hypotheses
The hypothesis IDs under which this arc exists.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
mrpt::safe_ptr< CHierarchicalMHMap > m_parent
The hierarchical graph in which this object is into.
CHMHMapNode::TNodeID m_nodeFrom
The origin/target nodes for this arc.
CHMHMapNode::TNodeID m_nodeTo
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
std::shared_ptr< CHMHMapArc > Ptr
void onNodeDestruction(CHMHMapNode *node)
Event handler to be called just before a node is being destroyed: it should be called only for nodes ...
std::string m_arcType
The type of the arc, the possibilities are:
virtual ~CHMHMapArc()
Destructor.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
A class for representing a node in a hierarchical, multi-hypothesis map.
std::shared_ptr< CHMHMapNode > Ptr
TNodeID getID() const
Reads the ID of the node (read-only property)
The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model.
void read(mrpt::serialization::CArchive &in)
void write(mrpt::serialization::CArchive &out) const
A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps.
Virtual base class for "archives": classes abstracting I/O streams.
EIGEN_STRONG_INLINE void push_back(Scalar val)
Insert an element at the end of the container (for 1D vectors/arrays)
EIGEN_STRONG_INLINE iterator begin()
const Scalar * const_iterator
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
void clear()
Clear the contents of this container.
uint64_t TNodeID
A generic numeric type for unique IDs of nodes or entities.
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned __int32 uint32_t