MSNoLogicJunction Class Reference

#include <MSNoLogicJunction.h>

Inheritance diagram for MSNoLogicJunction:

MSJunction

Detailed Description

This junctions let all vehicles past through so they only should be used on junctions where incoming vehicles are no foes to each other (may drive simultaneously).

Definition at line 52 of file MSNoLogicJunction.h.


Public Types

typedef std::vector
< ApproachingVehicleInformation
LinkApproachingVehicles

Public Member Functions

bool clearRequests ()
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.
 MSNoLogicJunction (const std::string &id, const Position2D &position, const Position2DVector &shape, std::vector< MSLane * > incoming) throw ()
 Constructor.
void postloadInit () throw (ProcessError)
bool setAllowed ()
 does nothing Implementation of MSJunction
virtual ~MSNoLogicJunction ()
 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

 MSNoLogicJunction (const MSNoLogicJunction &)
 Invalidated copy constructor.
MSNoLogicJunctionoperator= (const MSNoLogicJunction &)
 Invalidated assignment operator.

Private Attributes

std::vector< MSLane * > myIncomingLanes

Static Private Attributes

static std::bitset< 64 > myDump
 a dump container Request-setting vehicles may write into this container and responds are read from it. As responds are always true, this container is set to true for all links. This dump is also used as the mask for incoming non-first vehicles

Member Typedef Documentation

Definition at line 62 of file MSJunction.h.


Constructor & Destructor Documentation

MSNoLogicJunction::~MSNoLogicJunction (  )  [virtual]

Destructor.

Definition at line 76 of file MSNoLogicJunction.cpp.

00076 {}

MSNoLogicJunction::MSNoLogicJunction ( const std::string &  id,
const Position2D position,
const Position2DVector shape,
std::vector< MSLane * >  incoming 
) throw ()

Constructor.

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

Definition at line 52 of file MSNoLogicJunction.cpp.

00060         : MSJunction(id, position, shape),
00061         myIncomingLanes(incoming)
00062 #ifdef HAVE_INTERNAL_LANES
00063         , myInternalLanes(internal)
00064 #endif
00065 {
00066 }

MSNoLogicJunction::MSNoLogicJunction ( const MSNoLogicJunction  )  [private]

Invalidated copy constructor.


Member Function Documentation

bool MSNoLogicJunction::clearRequests (  )  [virtual]

Here, do nothing.

Implements MSJunction.

Definition at line 70 of file MSNoLogicJunction.cpp.

00070                                  {
00071     return true;
00072 }

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

Reimplemented in MSRightOfWayJunction.

Definition at line 116 of file MSJunction.h.

References MSJunction::myEmptyLanes.

00116                                                                                                      {
00117         return myEmptyLanes;
00118     }

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

Reimplemented in MSRightOfWayJunction.

Definition at line 112 of file MSJunction.h.

References MSJunction::myEmptyLinks.

00112                                                                                              {
00113         return myEmptyLinks;
00114     }

const std::string & MSJunction::getID (  )  const [inherited]

Returns the id of the junction.

Definition at line 65 of file MSJunction.cpp.

References MSJunction::myID.

Referenced by GUIJunctionWrapper::getMicrosimID().

00065                         {
00066     return myID;
00067 }

const Position2D & MSJunction::getPosition (  )  const [inherited]

returns the junction's position

Definition at line 55 of file MSJunction.cpp.

References MSJunction::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, inherited]

Returns this junction's shape.

Returns:
The shape of this junction

Definition at line 108 of file MSJunction.h.

References MSJunction::myShape.

Referenced by GUIJunctionWrapper::drawGL().

00108                                                      {
00109         return myShape;
00110     }

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

Invalidated assignment operator.

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

Initialises the junction after the net was completely loaded

Reimplemented from MSJunction.

Definition at line 81 of file MSNoLogicJunction.cpp.

References myDump, and myIncomingLanes.

00081                                                     {
00082     std::vector<MSLane*>::iterator i;
00083     // inform links where they have to report approaching vehicles to
00084     for (i=myIncomingLanes.begin(); i!=myIncomingLanes.end(); ++i) {
00085         const MSLinkCont &links = (*i)->getLinkCont();
00086         for (MSLinkCont::const_iterator j=links.begin(); j!=links.end(); j++) {
00087             (*j)->setRequestInformation(&myDump, 0, &myDump, 0, MSLogicJunction::LinkFoes(), false, false,
00088                                         std::vector<MSLink*>(), std::vector<MSLane*>());
00089         }
00090     }
00091 #ifdef HAVE_INTERNAL_LANES
00092     // set information for the internal lanes
00093     for (i=myInternalLanes.begin(); i!=myInternalLanes.end(); ++i) {
00094         // ... set information about participation
00095         static_cast<MSInternalLane*>(*i)->setParentJunctionInformation(&myDump, 0);
00096     }
00097 #endif
00098 }

bool MSNoLogicJunction::setAllowed (  )  [inline, virtual]

does nothing Implementation of MSJunction

Implements MSJunction.

Definition at line 77 of file MSNoLogicJunction.h.

00077                       {
00078         return true;
00079     };


Field Documentation

std::bitset< 64 > MSNoLogicJunction::myDump [static, private]

a dump container Request-setting vehicles may write into this container and responds are read from it. As responds are always true, this container is set to true for all links. This dump is also used as the mask for incoming non-first vehicles

Definition at line 105 of file MSNoLogicJunction.h.

Referenced by postloadInit().

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

Definition at line 131 of file MSJunction.h.

Referenced by MSJunction::getFoeInternalLanes().

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

Definition at line 130 of file MSJunction.h.

Referenced by MSJunction::getFoeLinks().

std::string MSJunction::myID [protected, inherited]

The id of the junction.

Definition at line 122 of file MSJunction.h.

Referenced by MSJunction::getID().

std::vector<MSLane*> MSNoLogicJunction::myIncomingLanes [private]

Lanes incoming to the junction

Definition at line 86 of file MSNoLogicJunction.h.

Referenced by postloadInit().

Position2D MSJunction::myPosition [protected, inherited]

The position of the junction.

Definition at line 125 of file MSJunction.h.

Referenced by MSJunction::getPosition().

Position2DVector MSJunction::myShape [protected, inherited]

The shape of the junction.

Definition at line 128 of file MSJunction.h.

Referenced by MSJunction::getShape().


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

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