Eclipse SUMO - Simulation of Urban MObility
ROAbstractEdgeBuilder Class Referenceabstract

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

#include <ROAbstractEdgeBuilder.h>

Inheritance diagram for ROAbstractEdgeBuilder:
Collaboration diagram for ROAbstractEdgeBuilder:

Public Member Functions

 ROAbstractEdgeBuilder ()
 Constructor. More...
 
virtual ~ROAbstractEdgeBuilder ()
 Destructor. More...
 
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. More...
 

Protected Member Functions

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

Private Member Functions

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

Private Attributes

int myCurrentIndex
 The next edge's index. More...
 

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

Constructor & Destructor Documentation

◆ ROAbstractEdgeBuilder() [1/2]

ROAbstractEdgeBuilder::ROAbstractEdgeBuilder ( )
inline

Constructor.

Definition at line 57 of file ROAbstractEdgeBuilder.h.

◆ ~ROAbstractEdgeBuilder()

virtual ROAbstractEdgeBuilder::~ROAbstractEdgeBuilder ( )
inlinevirtual

Destructor.

Definition at line 61 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 RODUAEdgeBuilder, ROMAEdgeBuilder, RODFEdgeBuilder, ROJTREdgeBuilder, and AGStreet::Builder.

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

◆ getNextIndex()

int ROAbstractEdgeBuilder::getNextIndex ( )
inlineprotected

Returns the index of the edge to built.

Returns
Next valid edge index

Definition at line 83 of file ROAbstractEdgeBuilder.h.

References myCurrentIndex.

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

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

Referenced by getNextIndex().


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