ROJTREdgeBuilder Class Reference

#include <ROJTREdgeBuilder.h>

Inheritance diagram for ROJTREdgeBuilder:

ROAbstractEdgeBuilder

Detailed Description

Interface for building instances of jtrrouter-edges.

This ROAbstractEdgeBuilder implementation builds edges for the jtrrouter (instances of ROJTREdge).

See also:
ROJTREdge

Definition at line 53 of file ROJTREdgeBuilder.h.


Public Member Functions

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

Protected Member Functions

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

Constructor & Destructor Documentation

ROJTREdgeBuilder::ROJTREdgeBuilder (  )  throw ()

Constructor.

Definition at line 41 of file ROJTREdgeBuilder.cpp.

00041 {}

ROJTREdgeBuilder::~ROJTREdgeBuilder (  )  throw ()

Destructor.

Definition at line 44 of file ROJTREdgeBuilder.cpp.

00044 {}


Member Function Documentation

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

Builds an edge with the given name.

This implementation builds a ROJTREdge.

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
See also:
ROJTREdge

Implements ROAbstractEdgeBuilder.

Definition at line 48 of file ROJTREdgeBuilder.cpp.

References ROAbstractEdgeBuilder::getNextIndex().

00048                                                                                    {
00049     return new ROJTREdge(name, from, to, getNextIndex());
00050 }

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

Returns the index of the edge to built.

Returns:
Next valid edge index

Definition at line 87 of file ROAbstractEdgeBuilder.h.

References ROAbstractEdgeBuilder::myCurrentIndex.

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

00087                                         {
00088         return myCurrentIndex++;
00089     }


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

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