39 CHMHMapArc::CHMHMapArc(
64 node->onArcDestruction(
this);
104 for (
auto it =
m_parent->m_arcs.begin();
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());
138 for (
auto& i : *
this)
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++)
156 this->push_back(theObj);
161 out << static_cast<uint32_t>(this->
size());
162 for (
const auto& i : *
this) out << *i;
THypothesisIDSet m_hypotheses
The hypothesis IDs under which this arc exists.
mrpt::safe_ptr< CHierarchicalMHMap > m_parent
The hierarchical graph in which this object is into.
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
#define ARC_TYPES
Used in constructor of mrpt::hmtslam::CHMHMapArc.
CHMHMapNode::TNodeID m_nodeTo
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void write(mrpt::serialization::CArchive &out) const
CHMHMapNode::TNodeID m_nodeFrom
The origin/target nodes for this arc.
A set of hypothesis IDs, used for arcs and nodes in multi-hypothesis hybrid maps. ...
std::string m_arcType
The type of the arc, the possibilities are:
CMHPropertiesValuesList m_annotations
The annotations of the arc, see the general description of the class for possible properties and valu...
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for "archives": classes abstracting I/O streams.
The most high level class for storing hybrid, multi-hypothesis maps in a graph-based model...
uint64_t TNodeID
A generic numeric type for unique IDs of nodes or entities.
TNodeID getID() const
Reads the ID of the node (read-only property)
void read(mrpt::serialization::CArchive &in)
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
A class for representing an arc between two nodes in a hierarchical, multi-hypothesis map...
~CHMHMapArc() override
Destructor.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
unsigned __int32 uint32_t
void clear()
Clear the contents of this container.
A class for representing a node in a hierarchical, multi-hypothesis map.
void onNodeDestruction(CHMHMapNode *node)
Event handler to be called just before a node is being destroyed: it should be called only for nodes ...