Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNESegment Class Reference

#include <GNESegment.h>

Collaboration diagram for GNESegment:
[legend]

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

GNEContourgetContour () const
 
GNEContourgetFromContour () const
 get from contour associated with segment (only if this is the first path segment)
 
GNEContourgetToContour () const
 get to contour associated with segment (only if this is the last path segment)
 
GNESegmentgetNextSegment () const
 functions related with the other paht segments
 
GNESegmentgetPreviousSegment () 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

GNEPathElementgetPathElement () const
 
const GNELanegetLane () const
 get lane associated with this segment
 
const GNELanegetPreviousLane () const
 get previous lane
 
const GNELanegetNextLane () const
 get next lane
 
int getLaneIndex () const
 get lane index
 
const GNEJunctiongetJunction () 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

GNEContourmyContour
 contour associated with segment
 
GNEContourmyFromContour
 from contour, used for moving elements (only in the first segment)
 
const GNEJunctionmyJunction
 junction associated with this segment
 
int myJunctionIndex = 0
 junction index
 
bool myLabelSegment
 flag for check if this segment is a label segment
 
const GNELanemyLane
 lane associated with this segment
 
int myLaneIndex = 0
 lane index
 
GNESegmentmyNextSegment
 pointer to next segment
 
GNEPathElementmyPathElement
 path element associated with this segment
 
GNEPathManagermyPathManager
 pointer to path manager
 
GNESegmentmyPreviousSegment
 pointer to previous segment
 
GNEContourmyToContour
 to contour, used for moving elements (only in the last segment)
 

Private Member Functions

 GNESegment ()
 default constructor
 
 GNESegment (const GNESegment &)=delete
 Invalidated copy constructor.
 
GNESegmentoperator= (const GNESegment &)=delete
 Invalidated assignment operator.
 

Detailed Description

Definition at line 36 of file GNESegment.h.

Constructor & Destructor Documentation

◆ GNESegment() [1/4]

GNESegment::GNESegment ( GNEPathManager pathManager,
GNEPathElement element,
const GNELane lane,
std::vector< GNESegment * > &  segments 
)

◆ GNESegment() [2/4]

GNESegment::GNESegment ( GNEPathManager pathManager,
GNEPathElement element,
const GNEJunction junction,
std::vector< GNESegment * > &  segments 
)

◆ ~GNESegment()

◆ GNESegment() [3/4]

GNESegment::GNESegment ( )
private

default constructor

Definition at line 231 of file GNESegment.cpp.

◆ GNESegment() [4/4]

GNESegment::GNESegment ( const GNESegment )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ getContour()

◆ getFromContour()

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().

Here is the caller graph for this function:

◆ getJunction()

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().

Here is the caller graph for this function:

◆ getJunctionIndex()

int GNESegment::getJunctionIndex ( ) const

get lane index

Definition at line 214 of file GNESegment.cpp.

References myJunctionIndex.

◆ getLane()

const GNELane * GNESegment::getLane ( ) const

◆ getLaneIndex()

int GNESegment::getLaneIndex ( ) const

get lane index

Definition at line 202 of file GNESegment.cpp.

References myLaneIndex.

◆ getNextLane()

◆ getNextSegment()

GNESegment * GNESegment::getNextSegment ( ) const

functions related with the other paht segments

get next segment

Definition at line 146 of file GNESegment.cpp.

References myNextSegment.

◆ getPathElement()

GNEPathElement * GNESegment::getPathElement ( ) const

Definition at line 170 of file GNESegment.cpp.

References myPathElement.

◆ getPreviousLane()

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().

Here is the caller graph for this function:

◆ getPreviousSegment()

GNESegment * GNESegment::getPreviousSegment ( ) const

get previous segment

Definition at line 152 of file GNESegment.cpp.

References myPreviousSegment.

◆ getToContour()

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().

Here is the caller graph for this function:

◆ isFirstSegment()

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().

Here is the caller graph for this function:

◆ isLabelSegment()

bool GNESegment::isLabelSegment ( ) const

check if segment is label segment

Definition at line 220 of file GNESegment.cpp.

References myLabelSegment.

Referenced by GNELaneAreaDetector::drawE2PartialLane().

Here is the caller graph for this function:

◆ isLastSegment()

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().

Here is the caller graph for this function:

◆ markSegmentLabel()

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().

Here is the caller graph for this function:

◆ operator=()

GNESegment & GNESegment::operator= ( const GNESegment )
privatedelete

Invalidated assignment operator.

Field Documentation

◆ myContour

GNEContour* GNESegment::myContour
protected

contour associated with segment

Definition at line 142 of file GNESegment.h.

Referenced by getContour(), and ~GNESegment().

◆ myFromContour

GNEContour* GNESegment::myFromContour
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().

◆ myJunction

const GNEJunction* GNESegment::myJunction
protected

junction associated with this segment

Definition at line 124 of file GNESegment.h.

Referenced by getJunction(), and GNESegment().

◆ myJunctionIndex

int GNESegment::myJunctionIndex = 0
protected

junction index

Definition at line 130 of file GNESegment.h.

Referenced by getJunctionIndex(), and GNESegment().

◆ myLabelSegment

bool GNESegment::myLabelSegment
protected

flag for check if this segment is a label segment

Definition at line 139 of file GNESegment.h.

Referenced by isLabelSegment(), and markSegmentLabel().

◆ myLane

const GNELane* GNESegment::myLane
protected

lane associated with this segment

Definition at line 121 of file GNESegment.h.

Referenced by getLane(), and GNESegment().

◆ myLaneIndex

int GNESegment::myLaneIndex = 0
protected

lane index

Definition at line 127 of file GNESegment.h.

Referenced by getLaneIndex(), and GNESegment().

◆ myNextSegment

GNESegment* GNESegment::myNextSegment
protected

pointer to next segment

Definition at line 133 of file GNESegment.h.

Referenced by getNextLane(), getNextSegment(), GNESegment(), GNESegment(), isLastSegment(), and ~GNESegment().

◆ myPathElement

GNEPathElement* GNESegment::myPathElement
protected

path element associated with this segment

Definition at line 118 of file GNESegment.h.

Referenced by getPathElement().

◆ myPathManager

GNEPathManager* GNESegment::myPathManager
protected

pointer to path manager

Definition at line 115 of file GNESegment.h.

Referenced by GNESegment(), GNESegment(), and ~GNESegment().

◆ myPreviousSegment

GNESegment* GNESegment::myPreviousSegment
protected

pointer to previous segment

Definition at line 136 of file GNESegment.h.

Referenced by getPreviousLane(), getPreviousSegment(), GNESegment(), GNESegment(), isFirstSegment(), and ~GNESegment().

◆ myToContour

GNEContour* GNESegment::myToContour
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().


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