Eclipse SUMO - Simulation of Urban MObility
|
#include <GNESegment.h>
Public Member Functions | |
GNESegment (GNEPathManager *pathManager, GNEPathElement *element, const GNEJunction *junction, std::vector< GNESegment * > &segments) | |
constructor for junctions | |
GNESegment (GNEPathManager *pathManager, GNEPathElement *element, const GNELane *lane, std::vector< GNESegment * > &segments) | |
constructor for lanes | |
~GNESegment () | |
destructor | |
functions related with segment contour | |
get contour associated with segment | |
GNEContour * | getContour () const |
GNEContour * | getFromContour () const |
get from contour associated with segment (only if this is the first path segment) | |
GNEContour * | getToContour () const |
get to contour associated with segment (only if this is the last path segment) | |
GNESegment * | getNextSegment () const |
functions related with the other paht segments | |
GNESegment * | getPreviousSegment () const |
get previous segment | |
bool | isFirstSegment () const |
check if segment is the first path's segment | |
bool | isLastSegment () const |
check if segment is the last path's segment | |
functions related with GNE elements associated with this segment | |
get path element | |
GNEPathElement * | getPathElement () const |
const GNELane * | getLane () const |
get lane associated with this segment | |
const GNELane * | getPreviousLane () const |
get previous lane | |
const GNELane * | getNextLane () const |
get next lane | |
int | getLaneIndex () const |
get lane index | |
const GNEJunction * | getJunction () const |
get junction associated with this segment | |
int | getJunctionIndex () const |
get lane index | |
functions related with labeling segments (used for certain elements as E2 multilane detectors) | |
bool | isLabelSegment () const |
check if segment is label segment | |
void | markSegmentLabel () |
mark segment as middle segment | |
Protected Attributes | |
GNEContour * | myContour |
contour associated with segment | |
GNEContour * | myFromContour |
from contour, used for moving elements (only in the first segment) | |
const GNEJunction * | myJunction |
junction associated with this segment | |
int | myJunctionIndex = 0 |
junction index | |
bool | myLabelSegment |
flag for check if this segment is a label segment | |
const GNELane * | myLane |
lane associated with this segment | |
int | myLaneIndex = 0 |
lane index | |
GNESegment * | myNextSegment |
pointer to next segment | |
GNEPathElement * | myPathElement |
path element associated with this segment | |
GNEPathManager * | myPathManager |
pointer to path manager | |
GNESegment * | myPreviousSegment |
pointer to previous segment | |
GNEContour * | myToContour |
to contour, used for moving elements (only in the last segment) | |
Private Member Functions | |
GNESegment () | |
default constructor | |
GNESegment (const GNESegment &)=delete | |
Invalidated copy constructor. | |
GNESegment & | operator= (const GNESegment &)=delete |
Invalidated assignment operator. | |
Definition at line 36 of file GNESegment.h.
GNESegment::GNESegment | ( | GNEPathManager * | pathManager, |
GNEPathElement * | element, | ||
const GNELane * | lane, | ||
std::vector< GNESegment * > & | segments | ||
) |
constructor for lanes
Definition at line 29 of file GNESegment.cpp.
References GNEPathManager::addSegmentInLaneSegments(), myFromContour, myLane, myLaneIndex, myNextSegment, myPathManager, myPreviousSegment, and myToContour.
GNESegment::GNESegment | ( | GNEPathManager * | pathManager, |
GNEPathElement * | element, | ||
const GNEJunction * | junction, | ||
std::vector< GNESegment * > & | segments | ||
) |
constructor for junctions
Definition at line 66 of file GNESegment.cpp.
References GNEPathManager::addSegmentInJunctionSegments(), myFromContour, myJunction, myJunctionIndex, myNextSegment, myPathManager, myPreviousSegment, and myToContour.
GNESegment::~GNESegment | ( | ) |
destructor
Definition at line 103 of file GNESegment.cpp.
References GNEPathManager::clearSegmentFromJunctionAndLaneSegments(), GNEPathManager::myCleaningSegments, myContour, myFromContour, myNextSegment, myPathManager, myPreviousSegment, and myToContour.
|
private |
default constructor
Definition at line 231 of file GNESegment.cpp.
|
privatedelete |
Invalidated copy constructor.
GNEContour * GNESegment::getContour | ( | ) | const |
Definition at line 128 of file GNESegment.cpp.
References myContour.
Referenced by GNELaneAreaDetector::drawJunctionPartialGL(), GNEEdgeRelData::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNELaneAreaDetector::drawLanePartialGL(), GNEEdgeData::drawLanePartialGL(), GNEEdgeRelData::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), and GNEDemandElementPlan::drawPlanLanePartial().
GNEContour * GNESegment::getFromContour | ( | ) | const |
get from contour associated with segment (only if this is the first path segment)
Definition at line 134 of file GNESegment.cpp.
References myFromContour.
Referenced by GNELaneAreaDetector::drawLanePartialGL().
const GNEJunction * GNESegment::getJunction | ( | ) | const |
get junction associated with this segment
Definition at line 208 of file GNESegment.cpp.
References myJunction.
Referenced by GNEPathManager::clearSegmentFromJunctionAndLaneSegments(), and GNEVehicle::drawJunctionPartialGL().
int GNESegment::getJunctionIndex | ( | ) | const |
const GNELane * GNESegment::getLane | ( | ) | const |
get lane associated with this segment
Definition at line 176 of file GNESegment.cpp.
References myLane.
Referenced by GNEPathManager::clearSegmentFromJunctionAndLaneSegments(), GNELaneAreaDetector::drawLanePartialGL(), GNEOverheadWire::drawLanePartialGL(), GNEEdgeData::drawLanePartialGL(), GNEEdgeRelData::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), GNEDemandElementPlan::drawPlanLanePartial(), GNERoute::drawRoutePartialLane(), getNextLane(), and getPreviousLane().
int GNESegment::getLaneIndex | ( | ) | const |
const GNELane * GNESegment::getNextLane | ( | ) | const |
get next lane
Definition at line 192 of file GNESegment.cpp.
References getLane(), and myNextSegment.
Referenced by GNEPathManager::PathDraw::checkDrawPathGeometry(), GNEDemandElementPlan::drawFromArrow(), GNELaneAreaDetector::drawJunctionPartialGL(), GNEOverheadWire::drawJunctionPartialGL(), GNEEdgeRelData::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), and GNERoute::drawRoutePartialLane().
GNESegment * GNESegment::getNextSegment | ( | ) | const |
functions related with the other paht segments
get next segment
Definition at line 146 of file GNESegment.cpp.
References myNextSegment.
GNEPathElement * GNESegment::getPathElement | ( | ) | const |
Definition at line 170 of file GNESegment.cpp.
References myPathElement.
const GNELane * GNESegment::getPreviousLane | ( | ) | const |
get previous lane
Definition at line 182 of file GNESegment.cpp.
References getLane(), and myPreviousSegment.
Referenced by GNEPathManager::PathDraw::checkDrawPathGeometry(), GNELaneAreaDetector::drawJunctionPartialGL(), GNEOverheadWire::drawJunctionPartialGL(), GNEEdgeRelData::drawJunctionPartialGL(), GNERoute::drawJunctionPartialGL(), GNEVehicle::drawJunctionPartialGL(), GNEDemandElementPlan::drawPlanJunctionPartial(), and GNEDemandElementPlan::drawToArrow().
GNESegment * GNESegment::getPreviousSegment | ( | ) | const |
GNEContour * GNESegment::getToContour | ( | ) | const |
get to contour associated with segment (only if this is the last path segment)
Definition at line 140 of file GNESegment.cpp.
References myToContour.
Referenced by GNELaneAreaDetector::drawLanePartialGL().
bool GNESegment::isFirstSegment | ( | ) | const |
check if segment is the first path's segment
Definition at line 158 of file GNESegment.cpp.
References myPreviousSegment.
Referenced by GNELaneAreaDetector::drawE2PartialLane(), GNELaneAreaDetector::drawLanePartialGL(), GNEOverheadWire::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), and GNEDemandElementPlan::drawPlanLanePartial().
bool GNESegment::isLabelSegment | ( | ) | const |
check if segment is label segment
Definition at line 220 of file GNESegment.cpp.
References myLabelSegment.
Referenced by GNELaneAreaDetector::drawE2PartialLane().
bool GNESegment::isLastSegment | ( | ) | const |
check if segment is the last path's segment
Definition at line 164 of file GNESegment.cpp.
References myNextSegment.
Referenced by GNELaneAreaDetector::drawE2PartialLane(), GNELaneAreaDetector::drawLanePartialGL(), GNEOverheadWire::drawLanePartialGL(), GNERoute::drawLanePartialGL(), GNEVehicle::drawLanePartialGL(), GNEDemandElementPlan::drawPlanLanePartial(), and GNEDemandElementPlan::getEndPosRadius().
void GNESegment::markSegmentLabel | ( | ) |
mark segment as middle segment
Definition at line 226 of file GNESegment.cpp.
References myLabelSegment.
Referenced by GNEPathManager::buildPath(), and GNEPathManager::markLabelSegment().
|
privatedelete |
Invalidated assignment operator.
|
protected |
contour associated with segment
Definition at line 142 of file GNESegment.h.
Referenced by getContour(), and ~GNESegment().
|
protected |
from contour, used for moving elements (only in the first segment)
Definition at line 145 of file GNESegment.h.
Referenced by getFromContour(), GNESegment(), GNESegment(), and ~GNESegment().
|
protected |
junction associated with this segment
Definition at line 124 of file GNESegment.h.
Referenced by getJunction(), and GNESegment().
|
protected |
junction index
Definition at line 130 of file GNESegment.h.
Referenced by getJunctionIndex(), and GNESegment().
|
protected |
flag for check if this segment is a label segment
Definition at line 139 of file GNESegment.h.
Referenced by isLabelSegment(), and markSegmentLabel().
|
protected |
lane associated with this segment
Definition at line 121 of file GNESegment.h.
Referenced by getLane(), and GNESegment().
|
protected |
lane index
Definition at line 127 of file GNESegment.h.
Referenced by getLaneIndex(), and GNESegment().
|
protected |
pointer to next segment
Definition at line 133 of file GNESegment.h.
Referenced by getNextLane(), getNextSegment(), GNESegment(), GNESegment(), isLastSegment(), and ~GNESegment().
|
protected |
path element associated with this segment
Definition at line 118 of file GNESegment.h.
Referenced by getPathElement().
|
protected |
pointer to path manager
Definition at line 115 of file GNESegment.h.
Referenced by GNESegment(), GNESegment(), and ~GNESegment().
|
protected |
pointer to previous segment
Definition at line 136 of file GNESegment.h.
Referenced by getPreviousLane(), getPreviousSegment(), GNESegment(), GNESegment(), isFirstSegment(), and ~GNESegment().
|
protected |
to contour, used for moving elements (only in the last segment)
Definition at line 148 of file GNESegment.h.
Referenced by getToContour(), GNESegment(), GNESegment(), and ~GNESegment().