CartoType API
Public Member Functions | Public Attributes
CartoType::Router::CNode Class Reference

#include <cartotype_router.h>

Inherited by CMapDataNode.

List of all members.

Public Member Functions

 CNode (const TPoint &aPosition)
virtual int32 Arcs (CRouterInfo &aRouterInfo, TResult &aError)=0
virtual const TArcArc (int32 aIndex)=0
const TPointPosition () const
int32 Priority () const
const TArcBestArc (CRouterInfo &aRouterInfo, TResult &aError) const

Public Attributes

CNodeiBestPath
int32 iCostFromStart
int32 iCostToEnd
TListLinkiListLink
bool iClosed

Detailed Description

An abstract node class: that is, an end point or intersection of routes.


Member Function Documentation

virtual const TArc& CartoType::Router::CNode::Arc ( int32  aIndex) [pure virtual]

Return one of the arcs leading from this node. The number of arcs in a node must be obtained by calling CRouterInfo::Arcs, which loads arcs if necessary.

virtual int32 CartoType::Router::CNode::Arcs ( CRouterInfo aRouterInfo,
TResult aError 
) [pure virtual]

Return the number of arcs leading from a node, allowing the CRouterInfo object to create them if necessary. This method allows arcs to be created on demand for nodes in areas for which data has not yet been fully loaded.

const TArc* CartoType::Router::CNode::BestArc ( CRouterInfo aRouterInfo,
TResult aError 
) const [inline]

Return the arc on the best route leading to this node, if known.

const TPoint& CartoType::Router::CNode::Position ( ) const [inline]

Return the position of this node in Cartesian coordinates.

int32 CartoType::Router::CNode::Priority ( ) const [inline]

Return the priority: the sum of the known cost from the start and the estimated cost to the end.


Member Data Documentation

A pointer back to the previous node on the best path to this node. This data member is modified by the router.

If the node has already been processed it is marked as closed.

The cost of reaching this node from the start node, using the path going back through iBestPath. This is the 'g' value in A* terminology. This data member is modified by the router.

The estimated cost from this node to the end node. This is the 'h' value in A* terminology.

A pointer to the list link containing this node, used for moving the node to its correct position quickly.


The documentation for this class was generated from the following file: