SUMO - Simulation of Urban MObility
ROAbstractEdgeBuilder Class Reference

Interface for building instances of router-edges. More...

#include <ROAbstractEdgeBuilder.h>

Inheritance diagram for ROAbstractEdgeBuilder:
RODFEdgeBuilder RODUAEdgeBuilder ROJTREdgeBuilder

Public Member Functions

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

Protected Member Functions

unsigned int getNextIndex ()
 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.

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 60 of file ROAbstractEdgeBuilder.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 63 of file ROAbstractEdgeBuilder.h.

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

Destructor.

Definition at line 67 of file ROAbstractEdgeBuilder.h.

Invalidated copy constructor.


Member Function Documentation

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

Builds an edge with the given name.

Parameters:
[in]nameThe name of the edge
[in]fromThe node the edge begins at
[in]toThe node the edge ends at
Returns:
A proper instance of the named edge

Implemented in RODUAEdgeBuilder, RODFEdgeBuilder, and ROJTREdgeBuilder.

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

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

Returns the index of the edge to built.

Returns:
Next valid edge index

Definition at line 88 of file ROAbstractEdgeBuilder.h.

References myCurrentIndex.

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

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

Invalidated assignment operator.


Field Documentation

The next edge's index.

Definition at line 95 of file ROAbstractEdgeBuilder.h.

Referenced by getNextIndex().


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines