ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::env::TCDSet Class Reference

#include <tcdset.h>

Collaboration diagram for adore::env::TCDSet:
Collaboration graph

Classes

struct  itpair
 
struct  my_equal
 

Public Member Functions

 TCDSet ()
 
virtual ~TCDSet ()
 
void setIsOwner (bool b)
 
bool getIsOwner ()
 
bool insertTCD (env::TrafficControlDevice *tcd)
 
void setMovementId (int tcdId, int movementId)
 
void setJunctionId (int movementId, int junctionId)
 
bool eraseTCD (int tcdID)
 
void clear ()
 
TCDIteratorPair getAllTCDs ()
 
ItCoordinate2tcdID getTCDsInRegion (double x0, double x1, double y0, double y1)
 
ItCoordinate2tcdID getTCDsOutsideRegion (double x0, double x1, double y0, double y1)
 
void removeTCDsOutsideRegion (double x0, double x1, double y0, double y1)
 
bool hasTCD (int tcdID)
 
env::TrafficControlDevicegetTCD (int tcdID)
 
env::TTCDTrafficLightTuple getTCDTrafficLight (int tcdID)
 

Protected Attributes

Coordinate2tcdIDs_RT m_coordinate2tcdIDs
 
std::unordered_map< int, env::TrafficControlDevice * > m_id2TCD
 
adore::env::TCDTrafficLightSet m_tcdTlSet
 
double m_guard
 
bool m_isOwner
 

Private Types

typedef boost::geometry::model::box< env::BorderBased::Coordinate::boost_pointboost_box
 
typedef std::pair< env::BorderBased::Coordinate::boost_point, int > idxCoordinate2tcdID
 
typedef boost::geometry::index::rtree< idxCoordinate2tcdID, boost::geometry::index::quadratic< 16 >, boost::geometry::index::indexable< idxCoordinate2tcdID >, my_equal< idxCoordinate2tcdID, env::BorderBased::Coordinate::boost_point > > Coordinate2tcdIDs_RT
 
typedef std::pair< std::unordered_map< int, env::TrafficControlDevice * >::iterator, std::unordered_map< int, env::TrafficControlDevice * >::iterator > TCDIteratorPair
 
typedef itpair< Coordinate2tcdIDs_RT::const_query_iterator, Coordinate2tcdIDs_RT::const_query_iterator > ItCoordinate2tcdID
 

Detailed Description

TCD Set that maps from coordinate to a list of TCDs with rTree from BOOST

Member Typedef Documentation

◆ boost_box

typedef boost::geometry::model::box<env::BorderBased::Coordinate::boost_point> adore::env::TCDSet::boost_box
private

◆ Coordinate2tcdIDs_RT

typedef boost::geometry::index::rtree< idxCoordinate2tcdID, boost::geometry::index::quadratic<16>, boost::geometry::index::indexable<idxCoordinate2tcdID>, my_equal<idxCoordinate2tcdID,env::BorderBased::Coordinate::boost_point> > adore::env::TCDSet::Coordinate2tcdIDs_RT
private

◆ idxCoordinate2tcdID

◆ ItCoordinate2tcdID

typedef itpair<Coordinate2tcdIDs_RT::const_query_iterator,Coordinate2tcdIDs_RT::const_query_iterator> adore::env::TCDSet::ItCoordinate2tcdID
private

◆ TCDIteratorPair

typedef std::pair<std::unordered_map<int, env::TrafficControlDevice*>::iterator,std::unordered_map<int, env::TrafficControlDevice*>::iterator> adore::env::TCDSet::TCDIteratorPair
private

Constructor & Destructor Documentation

◆ TCDSet()

adore::env::TCDSet::TCDSet ( )
inline

Constructor

◆ ~TCDSet()

virtual adore::env::TCDSet::~TCDSet ( )
inlinevirtual

Destructor clear xodrTCDSet

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void adore::env::TCDSet::clear ( )
inline

clear clear xodrTCDSet, also deletes TCD if owner

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eraseTCD()

bool adore::env::TCDSet::eraseTCD ( int  tcdID)
inline

erase DO NOT USE WHILE ITERATING WITH ITERATORS OVER RTree! erases specifed TCD from xodrTCDSet, if xodrTCDSet is owner also deletes TCD returns false if TCD does not exist

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAllTCDs()

TCDIteratorPair adore::env::TCDSet::getAllTCDs ( )
inline

getAllTCDs get begin() and end() iterators for all TCDs in xodrTCDSet

Here is the caller graph for this function:

◆ getIsOwner()

bool adore::env::TCDSet::getIsOwner ( )
inline

getIsOwner returns true if xodrTCDSet is responsible for memory management

Here is the caller graph for this function:

◆ getTCD()

env::TrafficControlDevice* adore::env::TCDSet::getTCD ( int  tcdID)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTCDsInRegion()

ItCoordinate2tcdID adore::env::TCDSet::getTCDsInRegion ( double  x0,
double  x1,
double  y0,
double  y1 
)
inline

getTCDsInRegion get begin() and end() iterators for all TCDs in defined region

Here is the caller graph for this function:

◆ getTCDsOutsideRegion()

ItCoordinate2tcdID adore::env::TCDSet::getTCDsOutsideRegion ( double  x0,
double  x1,
double  y0,
double  y1 
)
inline

getTCDsOutsideRegion get begin() and end() iterators for all TCDs outsite of defined region

Here is the caller graph for this function:

◆ getTCDTrafficLight()

env::TTCDTrafficLightTuple adore::env::TCDSet::getTCDTrafficLight ( int  tcdID)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasTCD()

bool adore::env::TCDSet::hasTCD ( int  tcdID)
inline

hasTCD returns true if TCD is in xodrTCDSet

Here is the caller graph for this function:

◆ insertTCD()

bool adore::env::TCDSet::insertTCD ( env::TrafficControlDevice tcd)
inline

insert new TCD as for now, if TCD already exists, replace it returns false if TCD was replaced

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeTCDsOutsideRegion()

void adore::env::TCDSet::removeTCDsOutsideRegion ( double  x0,
double  x1,
double  y0,
double  y1 
)
inline

removing TCDs in given region without

Here is the call graph for this function:

◆ setIsOwner()

void adore::env::TCDSet::setIsOwner ( bool  b)
inline

setIsOwner if xodrTCDSet is responsible for memory management, set true

Here is the caller graph for this function:

◆ setJunctionId()

void adore::env::TCDSet::setJunctionId ( int  movementId,
int  junctionId 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMovementId()

void adore::env::TCDSet::setMovementId ( int  tcdId,
int  movementId 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_coordinate2tcdIDs

Coordinate2tcdIDs_RT adore::env::TCDSet::m_coordinate2tcdIDs
protected

◆ m_guard

double adore::env::TCDSet::m_guard
protected

◆ m_id2TCD

std::unordered_map<int, env::TrafficControlDevice*> adore::env::TCDSet::m_id2TCD
protected

◆ m_isOwner

bool adore::env::TCDSet::m_isOwner
protected

◆ m_tcdTlSet

adore::env::TCDTrafficLightSet adore::env::TCDSet::m_tcdTlSet
protected

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