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

This class represents a set of objects that are positioned by LanePosition. More...

#include <lanepositionedobjectset.h>

Collaboration diagram for adore::env::BorderBased::LanePositionedObjectSet:
Collaboration graph

Public Types

typedef ALanePositionedObject object
 
typedef std::unordered_multimap< BorderID, object *, BorderIDHasherBorderID2Object
 
typedef BorderID2Object::iterator ObjectIterator
 
typedef std::pair< ObjectIterator, ObjectIteratorObjectIteratorPair
 

Public Member Functions

 LanePositionedObjectSet ()
 Construct a new LanePositionedObjectSet object. More...
 
virtual ~LanePositionedObjectSet ()
 Destroy the LanePositionedObjectSet object. More...
 
void setIsOwner (bool isOwner)
 Set the owner flag. More...
 
void clear ()
 Clear the LanePositionedObjectSet. More...
 
void discard_distant_objects (double x, double y, double distance=100.0)
 Discard distant objects. More...
 
template<typename T >
void discard_distant_objects (double x, double y, std::vector< T > &removedObjects, double distance=100.0)
 Discard distant objects. More...
 
void insert_object (object *obj, bool remove_duplicates=false, double precision=0.5)
 Insert a new object. More...
 
void erase_object (const LanePosition &position, double precision=0.5)
 Erase objects on a certain LanePosition. More...
 
void eraseObjectsBorderBased (const std::vector< Border * > borderSet)
 Erase Objects that are positioned on certain borders. More...
 
void eraseObjectsBorderBased (const std::vector< BorderID > borderIDSet)
 Erase Objects that are positioned on certain borders given by their BorderIDs. More...
 
bool hasObjects (const BorderID &borderID)
 Check whether at least one object is contained that is positioned on a certain Border. More...
 
ObjectIteratorPair getAllObjects ()
 Get the begin()- and end()-iterator for the whole set. More...
 
ObjectIteratorPair getObjects (const BorderID &borderID)
 Get the begin()- and end()-iterator for objects that are positioned on a certain border. More...
 
std::vector< object * > getObjects (const LanePosition &position, double precision=0.5)
 Get the objects that are positioned on a certain LanePosition. More...
 
bool hasObjects (const LanePosition &position, double precision=0.5)
 Check whether the set holds at least one object on a certain LanePosition. More...
 
void erase_objectsWithUnknownBordersOutsideRadius (BorderSet *borderSet, Coordinate center, double radius)
 Erase objects that are positioned that are outside a specified circle. More...
 

Private Attributes

BorderID2Object borderId2Object
 
bool m_isOwner
 

Detailed Description

This class represents a set of objects that are positioned by LanePosition.

Member Typedef Documentation

◆ BorderID2Object

◆ object

◆ ObjectIterator

◆ ObjectIteratorPair

Constructor & Destructor Documentation

◆ LanePositionedObjectSet()

adore::env::BorderBased::LanePositionedObjectSet::LanePositionedObjectSet ( )
inline

Construct a new LanePositionedObjectSet object.

◆ ~LanePositionedObjectSet()

virtual adore::env::BorderBased::LanePositionedObjectSet::~LanePositionedObjectSet ( )
inlinevirtual

Destroy the LanePositionedObjectSet object.

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void adore::env::BorderBased::LanePositionedObjectSet::clear ( )
inline

Clear the LanePositionedObjectSet.

Here is the caller graph for this function:

◆ discard_distant_objects() [1/2]

void adore::env::BorderBased::LanePositionedObjectSet::discard_distant_objects ( double  x,
double  y,
double  distance = 100.0 
)
inline

Discard distant objects.

Parameters
xx-coordinate of the reference point
yy-coordinate of the reference point
distancemaximal distance to for the objects to keep (default: 100)
Here is the call graph for this function:

◆ discard_distant_objects() [2/2]

template<typename T >
void adore::env::BorderBased::LanePositionedObjectSet::discard_distant_objects ( double  x,
double  y,
std::vector< T > &  removedObjects,
double  distance = 100.0 
)
inline

Discard distant objects.

The removed Objects are written into a vector

Parameters
xx-coordinate of the reference point
yy-coordinate of the reference point
removedObjectslist of removed objects
distancemaximal distance to for the objects to keep (default: 100)
Here is the call graph for this function:

◆ erase_object()

void adore::env::BorderBased::LanePositionedObjectSet::erase_object ( const LanePosition position,
double  precision = 0.5 
)
inline

Erase objects on a certain LanePosition.

Parameters
positionLanePosition where objects should be erased
precisionthe Position is compared with this precision (default: 0.5)
Here is the caller graph for this function:

◆ erase_objectsWithUnknownBordersOutsideRadius()

void adore::env::BorderBased::LanePositionedObjectSet::erase_objectsWithUnknownBordersOutsideRadius ( BorderSet borderSet,
Coordinate  center,
double  radius 
)
inline

Erase objects that are positioned that are outside a specified circle.

Parameters
borderSetset of Borders. Objects that are positioned on these borders are not deleted.
centerCoordinates of the center point of the circle
radiusradius of the circle
Here is the call graph for this function:

◆ eraseObjectsBorderBased() [1/2]

void adore::env::BorderBased::LanePositionedObjectSet::eraseObjectsBorderBased ( const std::vector< Border * >  borderSet)
inline

Erase Objects that are positioned on certain borders.

Parameters
borderSetvector of borders on which objects are removed
Here is the caller graph for this function:

◆ eraseObjectsBorderBased() [2/2]

void adore::env::BorderBased::LanePositionedObjectSet::eraseObjectsBorderBased ( const std::vector< BorderID borderIDSet)
inline

Erase Objects that are positioned on certain borders given by their BorderIDs.

Parameters
borderIDSetvector of borders given by BorderIDs on which objects are removed

◆ getAllObjects()

ObjectIteratorPair adore::env::BorderBased::LanePositionedObjectSet::getAllObjects ( )
inline

Get the begin()- and end()-iterator for the whole set.

Returns
ObjectIteratorPair begin()- and end()-iterator
Here is the caller graph for this function:

◆ getObjects() [1/2]

ObjectIteratorPair adore::env::BorderBased::LanePositionedObjectSet::getObjects ( const BorderID borderID)
inline

Get the begin()- and end()-iterator for objects that are positioned on a certain border.

Parameters
borderIDspecifies the border
Returns
ObjectIteratorPair begin()- and end()-iterator
Here is the caller graph for this function:

◆ getObjects() [2/2]

std::vector<object*> adore::env::BorderBased::LanePositionedObjectSet::getObjects ( const LanePosition position,
double  precision = 0.5 
)
inline

Get the objects that are positioned on a certain LanePosition.

Parameters
positionLanePosition
precisionprecision that is used for the comparision of the LanePositions
Returns
std::vector<object*> vector of objects that are positioned on the specified LanePosition
Here is the call graph for this function:

◆ hasObjects() [1/2]

bool adore::env::BorderBased::LanePositionedObjectSet::hasObjects ( const BorderID borderID)
inline

Check whether at least one object is contained that is positioned on a certain Border.

Parameters
borderIDspecifies the border
Returns
true if at least one object in the set is positioned with the given border
false if no object is positioned with the given border
Here is the caller graph for this function:

◆ hasObjects() [2/2]

bool adore::env::BorderBased::LanePositionedObjectSet::hasObjects ( const LanePosition position,
double  precision = 0.5 
)
inline

Check whether the set holds at least one object on a certain LanePosition.

Parameters
positionLanePosition
precisionprecision for the comparison of the LanePositions
Returns
true if there is at least one object at the specified LanePosition
false if no object is at the specified LanePosition
Here is the call graph for this function:

◆ insert_object()

void adore::env::BorderBased::LanePositionedObjectSet::insert_object ( object obj,
bool  remove_duplicates = false,
double  precision = 0.5 
)
inline

Insert a new object.

Parameters
objobject to insert
remove_duplicatesindicates whether duplicates should be removed (default: true)
precisionprecision for checking for duplicates (default: 0.5)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIsOwner()

void adore::env::BorderBased::LanePositionedObjectSet::setIsOwner ( bool  isOwner)
inline

Set the owner flag.

Parameters
isOwner
Here is the caller graph for this function:

Member Data Documentation

◆ borderId2Object

BorderID2Object adore::env::BorderBased::LanePositionedObjectSet::borderId2Object
private

mapping the border ids with the objects

◆ m_isOwner

bool adore::env::BorderBased::LanePositionedObjectSet::m_isOwner
private

indicates whether object is owned


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