ROAbstractEdgeBuilder Class Reference

#include <ROAbstractEdgeBuilder.h>

Inheritance diagram for ROAbstractEdgeBuilder:

RODFEdgeBuilder RODUAEdgeBuilder ROJTREdgeBuilder

Detailed Description

Interface for building instances of router-edges.

As the different routing algorithms may need certain types of edges, edges are build via a factory object derived from this class.

The only method to be implemented is "buildEdge" which builds an edge of the needed ROEdge-subtype.

The built edges are numbered in the order they are built, the current number (index) is stored in "myCurrentIndex" and the next to use may be obtained via "getNextIndex".

Definition at line 59 of file ROAbstractEdgeBuilder.h.


Public Member Functions

 ROAbstractEdgeBuilder () throw ()
 Constructor.
virtual ~ROAbstractEdgeBuilder () throw ()
 Destructor.
Methods to be implemented
virtual ROEdgebuildEdge (const std::string &name, RONode *from, RONode *to)=0 throw ()
 Builds an edge with the given name.

Protected Member Functions

unsigned int getNextIndex () throw ()
 Returns the index of the edge to built.

Private Member Functions

ROAbstractEdgeBuilderoperator= (const ROAbstractEdgeBuilder &src)
 Invalidated assignment operator.
 ROAbstractEdgeBuilder (const ROAbstractEdgeBuilder &src)
 Invalidated copy constructor.

Private Attributes

unsigned int myCurrentIndex
 The next edge's index.

Constructor & Destructor Documentation

ROAbstractEdgeBuilder::ROAbstractEdgeBuilder (  )  throw () [inline]

Constructor.

Definition at line 62 of file ROAbstractEdgeBuilder.h.

00062 : myCurrentIndex(0) { }

virtual ROAbstractEdgeBuilder::~ROAbstractEdgeBuilder (  )  throw () [inline, virtual]

Destructor.

Definition at line 66 of file ROAbstractEdgeBuilder.h.

00066 { }

ROAbstractEdgeBuilder::ROAbstractEdgeBuilder ( const ROAbstractEdgeBuilder src  )  [private]

Invalidated copy constructor.


Member Function Documentation

virtual ROEdge* ROAbstractEdgeBuilder::buildEdge ( const std::string &  name,
RONode from,
RONode to 
) throw () [pure virtual]

Builds an edge with the given name.

Parameters:
[in] name The name of the edge
[in] from The node the edge begins at
[in] to The node the edge ends at
Returns:
A proper instance of the named edge

Implemented in RODFEdgeBuilder, RODUAEdgeBuilder, and ROJTREdgeBuilder.

Referenced by RONetHandler::parseDistrict(), and RONetHandler::parseEdge().

unsigned int ROAbstractEdgeBuilder::getNextIndex (  )  throw () [inline, protected]

Returns the index of the edge to built.

Returns:
Next valid edge index

Definition at line 87 of file ROAbstractEdgeBuilder.h.

References myCurrentIndex.

Referenced by ROJTREdgeBuilder::buildEdge(), RODUAEdgeBuilder::buildEdge(), and RODFEdgeBuilder::buildEdge().

00087                                         {
00088         return myCurrentIndex++;
00089     }

ROAbstractEdgeBuilder& ROAbstractEdgeBuilder::operator= ( const ROAbstractEdgeBuilder src  )  [private]

Invalidated assignment operator.


Field Documentation

unsigned int ROAbstractEdgeBuilder::myCurrentIndex [private]

The next edge's index.

Definition at line 94 of file ROAbstractEdgeBuilder.h.

Referenced by getNextIndex().


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

Generated on Wed May 5 00:06:59 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6