Main MRPT website > C++ reference for MRPT 1.4.0
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
mrpt::hmtslam::CHMHMapNode Class Reference

Detailed Description

A class for representing a node in a hierarchical, multi-hypothesis map.

The node itself will be considered only if some given hypothesisID matchs its own ID.

Note
Create objects by invoking the class factory "::Create"
See also
CHierarchicalMHMap,CHMHMapArc

Definition at line 37 of file CHMHMapNode.h.

#include <mrpt/hmtslam/CHMHMapNode.h>

Inheritance diagram for mrpt::hmtslam::CHMHMapNode:
Inheritance graph

Public Types

typedef mrpt::utils::TNodeID TNodeID
 The type of the IDs of nodes.
 

Public Member Functions

virtual ~CHMHMapNode ()
 Destructor.
 
TNodeID getID () const
 Reads the ID of the node (read-only property)
 
unsigned int getLevelInTheHierarchy ()
 Returns the level of this node in the hierarchy of arcs "arcType_Belongs", where level=0 is the ground level, 1=its parents, etc.
 
unsigned int getRelatedArcsCount ()
 Returns the number of arcs starting from/ending into this node.
 
void getArcs (TArcList &out) const
 Returns a list with the arcs from/to this node.
 
void getArcs (TArcList &out, const THypothesisID &hyp_id) const
 Returns a list with the arcs from/to this node existing in a given hypothesis ID.
 
void getArcs (TArcList &out, const char *arcType, const THypothesisID &hyp_id) const
 Returns a list with the arcs from/to this node existing in a given hypothesis ID and of a given type.
 
bool isNeighbor (const TNodeID &otherArea, const THypothesisID &hyp_id) const
 Check whether an arc exists towards the given area.
 

Static Public Member Functions

static CHMHMapNodePtr Create (CHierarchicalMHMap *parent=NULL, const THypothesisIDSet &hyps=THypothesisIDSet())
 Class factory.
 

Public Attributes

THypothesisIDSet m_hypotheses
 The hypothesis IDs under which this node exists.
 
utils::CMHPropertiesValuesList m_annotations
 The annotations of the node, see the general description of the class for possible properties and values.
 
utils::CTypeSelector m_nodeType
 The type of the node, the possibilities are:
 
std::string m_label
 The label of the node, only for display it to the user.
 

Protected Member Functions

void onArcDestruction (CHMHMapArc *arc)
 Event handler for arc destruction: It should be only called for arcs from/to this node, altought other case must be handled without effects.
 
void onArcAddition (CHMHMapArcPtr &arc)
 Event handler for arc addition: It should be only called for arcs from/to this node, altought other cases have no effects.
 
CSerializable virtual methods
void writeToStream (mrpt::utils::CStream &out, int *getVersion) const MRPT_OVERRIDE
 
void readFromStream (mrpt::utils::CStream &in, int version) MRPT_OVERRIDE
 

Protected Attributes

TNodeID m_ID
 An unique identifier for the node: it is randomly generated at construction or read from stream when loaded.
 
TArcList m_arcs
 The list of all arcs from/to this node:
 
mrpt::utils::safe_ptr< CHierarchicalMHMapm_parent
 The hierarchical graph in which this object is into.
 

Private Member Functions

 CHMHMapNode (CHierarchicalMHMap *parent=NULL, const THypothesisIDSet &hyps=THypothesisIDSet())
 Private constructor (see Create class factory)
 

Friends

class HMTSLAM_IMPEXP CHierarchicalMHMap
 
class HMTSLAM_IMPEXP CHierarchicalMHMapPartition
 
class HMTSLAM_IMPEXP CHMHMapArc
 

RTTI stuff <br>

typedef CHMHMapNodePtr SmartPtr
 
static mrpt::utils::CLASSINIT _init_CHMHMapNode
 
static mrpt::utils::TRuntimeClassId classCHMHMapNode
 
static const mrpt::utils::TRuntimeClassIdclassinfo
 
static const mrpt::utils::TRuntimeClassId_GetBaseClass ()
 
virtual const mrpt::utils::TRuntimeClassIdGetRuntimeClass () const MRPT_OVERRIDE
 
virtual mrpt::utils::CObjectduplicate () const MRPT_OVERRIDE
 
static mrpt::utils::CObjectCreateObject ()
 
static CHMHMapNodePtr Create ()
 

Member Typedef Documentation

◆ SmartPtr

A typedef for the associated smart pointer

Definition at line 44 of file CHMHMapNode.h.

◆ TNodeID

The type of the IDs of nodes.

Definition at line 49 of file CHMHMapNode.h.

Constructor & Destructor Documentation

◆ CHMHMapNode()

mrpt::hmtslam::CHMHMapNode::CHMHMapNode ( CHierarchicalMHMap parent = NULL,
const THypothesisIDSet hyps = THypothesisIDSet() 
)
private

Private constructor (see Create class factory)

◆ ~CHMHMapNode()

virtual mrpt::hmtslam::CHMHMapNode::~CHMHMapNode ( )
virtual

Destructor.

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::utils::TRuntimeClassId * mrpt::hmtslam::CHMHMapNode::_GetBaseClass ( )
staticprotected

◆ Create() [1/2]

static CHMHMapNodePtr mrpt::hmtslam::CHMHMapNode::Create ( )
static

◆ Create() [2/2]

static CHMHMapNodePtr mrpt::hmtslam::CHMHMapNode::Create ( CHierarchicalMHMap parent = NULL,
const THypothesisIDSet hyps = THypothesisIDSet() 
)
static

Class factory.

◆ CreateObject()

static mrpt::utils::CObject * mrpt::hmtslam::CHMHMapNode::CreateObject ( )
static

◆ duplicate()

virtual mrpt::utils::CObject * mrpt::hmtslam::CHMHMapNode::duplicate ( ) const
virtual

◆ getArcs() [1/3]

void mrpt::hmtslam::CHMHMapNode::getArcs ( TArcList out) const
inline

Returns a list with the arcs from/to this node.

Definition at line 125 of file CHMHMapNode.h.

◆ getArcs() [2/3]

void mrpt::hmtslam::CHMHMapNode::getArcs ( TArcList out,
const char *  arcType,
const THypothesisID hyp_id 
) const

Returns a list with the arcs from/to this node existing in a given hypothesis ID and of a given type.

◆ getArcs() [3/3]

void mrpt::hmtslam::CHMHMapNode::getArcs ( TArcList out,
const THypothesisID hyp_id 
) const

Returns a list with the arcs from/to this node existing in a given hypothesis ID.

◆ getID()

TNodeID mrpt::hmtslam::CHMHMapNode::getID ( ) const

Reads the ID of the node (read-only property)

◆ getLevelInTheHierarchy()

unsigned int mrpt::hmtslam::CHMHMapNode::getLevelInTheHierarchy ( )

Returns the level of this node in the hierarchy of arcs "arcType_Belongs", where level=0 is the ground level, 1=its parents, etc.

◆ getRelatedArcsCount()

unsigned int mrpt::hmtslam::CHMHMapNode::getRelatedArcsCount ( )

Returns the number of arcs starting from/ending into this node.

◆ GetRuntimeClass()

virtual const mrpt::utils::TRuntimeClassId * mrpt::hmtslam::CHMHMapNode::GetRuntimeClass ( ) const
virtual

◆ isNeighbor()

bool mrpt::hmtslam::CHMHMapNode::isNeighbor ( const TNodeID otherArea,
const THypothesisID hyp_id 
) const

Check whether an arc exists towards the given area.

◆ onArcAddition()

void mrpt::hmtslam::CHMHMapNode::onArcAddition ( CHMHMapArcPtr arc)
protected

Event handler for arc addition: It should be only called for arcs from/to this node, altought other cases have no effects.

◆ onArcDestruction()

void mrpt::hmtslam::CHMHMapNode::onArcDestruction ( CHMHMapArc arc)
protected

Event handler for arc destruction: It should be only called for arcs from/to this node, altought other case must be handled without effects.

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.

◆ readFromStream()

void mrpt::hmtslam::CHMHMapNode::readFromStream ( mrpt::utils::CStream in,
int  version 
)
protected

◆ writeToStream()

void mrpt::hmtslam::CHMHMapNode::writeToStream ( mrpt::utils::CStream out,
int *  getVersion 
) const
protected

Friends And Related Function Documentation

◆ CHierarchicalMHMap

friend class HMTSLAM_IMPEXP CHierarchicalMHMap
friend

Definition at line 39 of file CHMHMapNode.h.

◆ CHierarchicalMHMapPartition

friend class HMTSLAM_IMPEXP CHierarchicalMHMapPartition
friend

Definition at line 40 of file CHMHMapNode.h.

◆ CHMHMapArc

friend class HMTSLAM_IMPEXP CHMHMapArc
friend

Definition at line 41 of file CHMHMapNode.h.

Member Data Documentation

◆ _init_CHMHMapNode

mrpt::utils::CLASSINIT mrpt::hmtslam::CHMHMapNode::_init_CHMHMapNode
staticprotected

Definition at line 44 of file CHMHMapNode.h.

◆ classCHMHMapNode

mrpt::utils::TRuntimeClassId mrpt::hmtslam::CHMHMapNode::classCHMHMapNode
static

Definition at line 44 of file CHMHMapNode.h.

◆ classinfo

const mrpt::utils::TRuntimeClassId* mrpt::hmtslam::CHMHMapNode::classinfo
static

Definition at line 44 of file CHMHMapNode.h.

◆ m_annotations

utils::CMHPropertiesValuesList mrpt::hmtslam::CHMHMapNode::m_annotations

The annotations of the node, see the general description of the class for possible properties and values.

Definition at line 97 of file CHMHMapNode.h.

◆ m_arcs

TArcList mrpt::hmtslam::CHMHMapNode::m_arcs
protected

The list of all arcs from/to this node:

Definition at line 62 of file CHMHMapNode.h.

◆ m_hypotheses

THypothesisIDSet mrpt::hmtslam::CHMHMapNode::m_hypotheses

The hypothesis IDs under which this node exists.

Definition at line 53 of file CHMHMapNode.h.

◆ m_ID

TNodeID mrpt::hmtslam::CHMHMapNode::m_ID
protected

An unique identifier for the node: it is randomly generated at construction or read from stream when loaded.

Definition at line 58 of file CHMHMapNode.h.

◆ m_label

std::string mrpt::hmtslam::CHMHMapNode::m_label

The label of the node, only for display it to the user.

Definition at line 113 of file CHMHMapNode.h.

◆ m_nodeType

utils::CTypeSelector mrpt::hmtslam::CHMHMapNode::m_nodeType

The type of the node, the possibilities are:

  • Place
  • Area
  • TopologicalMap
  • Object

Definition at line 105 of file CHMHMapNode.h.

◆ m_parent

mrpt::utils::safe_ptr<CHierarchicalMHMap> mrpt::hmtslam::CHMHMapNode::m_parent
protected

The hierarchical graph in which this object is into.

Definition at line 75 of file CHMHMapNode.h.




Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Wed Mar 22 20:12:58 UTC 2023