MSJunction Class Reference

#include <MSJunction.h>

Inheritance diagram for MSJunction:

MSLogicJunction MSNoLogicJunction MSRightOfWayJunction

Detailed Description

The base class for an intersection.

Definition at line 52 of file MSJunction.h.


Public Types

typedef std::vector
< ApproachingVehicleInformation
LinkApproachingVehicles

Public Member Functions

virtual bool clearRequests ()=0
virtual const std::vector
< MSLane * > & 
getFoeInternalLanes (const MSLink *const srcLink) const throw ()
virtual const std::vector
< MSLink * > & 
getFoeLinks (const MSLink *const srcLink) const throw ()
const std::string & getID () const
 Returns the id of the junction.
const Position2DgetPosition () const
const Position2DVectorgetShape () const throw ()
 Returns this junction's shape.
 MSJunction (const std::string &id, const Position2D &position, const Position2DVector &shape) throw ()
 Constructor.
virtual void postloadInit () throw (ProcessError)
virtual bool setAllowed ()=0
 Sets the responds.
virtual ~MSJunction ()
 Destructor.

Protected Attributes

std::vector< MSLane * > myEmptyLanes
std::vector< MSLink * > myEmptyLinks
std::string myID
 The id of the junction.
Position2D myPosition
 The position of the junction.
Position2DVector myShape
 The shape of the junction.

Private Member Functions

 MSJunction (const MSJunction &)
 Invalidated copy constructor.
MSJunctionoperator= (const MSJunction &)
 Invalidated assignment operator.

Data Structures

struct  ApproachingVehicleInformation
class  vehicle_in_request_finder

Member Typedef Documentation

Definition at line 62 of file MSJunction.h.


Constructor & Destructor Documentation

MSJunction::~MSJunction (  )  [virtual]

Destructor.

Definition at line 51 of file MSJunction.cpp.

00051 {}

MSJunction::MSJunction ( const std::string &  id,
const Position2D position,
const Position2DVector shape 
) throw ()

Constructor.

Parameters:
[in] id The id of the junction
[in] position The position of the junction
[in] shape The shape of the junction

Definition at line 46 of file MSJunction.cpp.

00048         : myID(id), myPosition(position), myShape(shape) {}

MSJunction::MSJunction ( const MSJunction  )  [private]

Invalidated copy constructor.


Member Function Documentation

virtual bool MSJunction::clearRequests (  )  [pure virtual]

Clears junction's and lane's requests to prepare for the next iteration.

Implemented in MSNoLogicJunction, and MSRightOfWayJunction.

Referenced by MSJunctionControl::resetRequests().

virtual const std::vector<MSLane*>& MSJunction::getFoeInternalLanes ( const MSLink *const   srcLink  )  const throw () [inline, virtual]

Reimplemented in MSRightOfWayJunction.

Definition at line 116 of file MSJunction.h.

References myEmptyLanes.

00116                                                                                                      {
00117         return myEmptyLanes;
00118     }

virtual const std::vector<MSLink*>& MSJunction::getFoeLinks ( const MSLink *const   srcLink  )  const throw () [inline, virtual]

Reimplemented in MSRightOfWayJunction.

Definition at line 112 of file MSJunction.h.

References myEmptyLinks.

00112                                                                                              {
00113         return myEmptyLinks;
00114     }

const std::string & MSJunction::getID (  )  const

Returns the id of the junction.

Definition at line 65 of file MSJunction.cpp.

References myID.

Referenced by GUIJunctionWrapper::getMicrosimID().

00065                         {
00066     return myID;
00067 }

const Position2D & MSJunction::getPosition (  )  const

returns the junction's position

Definition at line 55 of file MSJunction.cpp.

References myPosition.

Referenced by GUIJunctionWrapper::drawGL(), GUINet::getJunctionPosition(), traci::TraCIServer::handleTrafficLightDomain(), and TraCIServerAPI_Junction::processGet().

00055                               {
00056     return myPosition;
00057 }

const Position2DVector& MSJunction::getShape (  )  const throw () [inline]

Returns this junction's shape.

Returns:
The shape of this junction

Definition at line 108 of file MSJunction.h.

References myShape.

Referenced by GUIJunctionWrapper::drawGL().

00108                                                      {
00109         return myShape;
00110     }

MSJunction& MSJunction::operator= ( const MSJunction  )  [private]

Invalidated assignment operator.

void MSJunction::postloadInit (  )  throw (ProcessError) [virtual]

performs some initialisation after the loading (e.g., link map computation)

Reimplemented in MSLogicJunction, MSNoLogicJunction, and MSRightOfWayJunction.

Definition at line 61 of file MSJunction.cpp.

00061 {}

virtual bool MSJunction::setAllowed (  )  [pure virtual]

Sets the responds.

Implemented in MSNoLogicJunction, and MSRightOfWayJunction.

Referenced by MSJunctionControl::setAllowed().


Field Documentation

std::vector<MSLane*> MSJunction::myEmptyLanes [protected]

Definition at line 131 of file MSJunction.h.

Referenced by getFoeInternalLanes().

std::vector<MSLink*> MSJunction::myEmptyLinks [protected]

Definition at line 130 of file MSJunction.h.

Referenced by getFoeLinks().

std::string MSJunction::myID [protected]

The id of the junction.

Definition at line 122 of file MSJunction.h.

Referenced by getID().

The position of the junction.

Definition at line 125 of file MSJunction.h.

Referenced by getPosition().

The shape of the junction.

Definition at line 128 of file MSJunction.h.

Referenced by getShape().


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

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