Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
ROAbstractEdgeBuilder Class Referenceabstract

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

#include <ROAbstractEdgeBuilder.h>

Inheritance diagram for ROAbstractEdgeBuilder:
[legend]

Public Member Functions

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

Protected Member Functions

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

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

Constructor & Destructor Documentation

◆ ROAbstractEdgeBuilder() [1/2]

ROAbstractEdgeBuilder::ROAbstractEdgeBuilder ( )
inline

Constructor.

Definition at line 54 of file ROAbstractEdgeBuilder.h.

◆ ~ROAbstractEdgeBuilder()

virtual ROAbstractEdgeBuilder::~ROAbstractEdgeBuilder ( )
inlinevirtual

Destructor.

Definition at line 58 of file ROAbstractEdgeBuilder.h.

◆ ROAbstractEdgeBuilder() [2/2]

ROAbstractEdgeBuilder::ROAbstractEdgeBuilder ( const ROAbstractEdgeBuilder src)
private

Invalidated copy constructor.

Member Function Documentation

◆ buildEdge()

virtual ROEdge * ROAbstractEdgeBuilder::buildEdge ( const std::string &  name,
RONode from,
RONode to,
const int  priority 
)
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
[in]priorityThe edge priority (road class)
Returns
A proper instance of the named edge

Implemented in AGStreet::Builder, RODFEdgeBuilder, RODUAEdgeBuilder, ROJTREdgeBuilder, and ROMAEdgeBuilder.

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

Here is the caller graph for this function:

◆ getNextIndex()

int ROAbstractEdgeBuilder::getNextIndex ( )
inlineprotected

Returns the index of the edge to built.

Returns
Next valid edge index

Definition at line 80 of file ROAbstractEdgeBuilder.h.

References myCurrentIndex.

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

Here is the caller graph for this function:

◆ operator=()

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

Invalidated assignment operator.

Field Documentation

◆ myCurrentIndex

int ROAbstractEdgeBuilder::myCurrentIndex
private

The next edge's index.

Definition at line 87 of file ROAbstractEdgeBuilder.h.

Referenced by getNextIndex().


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