maliput_object
ObjectBook< Coordinate > Class Template Referenceabstract

Detailed Description

template<typename Coordinate>
class maliput::object::api::ObjectBook< Coordinate >

Book for Objects in a given Coordinate system.

TODO(#14): ObjectBook should be capable of holding all Objects regardless of the Coordinate that determines their spatial characteristics. When finding by regions it should be able of filtering by coordinate type.

#include <include/maliput_object/api/object_book.h>

Inheritance diagram for ObjectBook< Coordinate >:
[legend]

Public Member Functions

virtual ~ObjectBook ()=default
 
std::unordered_map< typename Object< Coordinate >::Id, Object< Coordinate > * > objects () const
 Gets all the Objects in the book. More...
 
Object< Coordinate > * FindById (const typename Object< Coordinate >::Id &object_id) const
 Finds Object by Id. More...
 
std::vector< Object< Coordinate > * > FindByPredicate (std::function< bool(const Object< Coordinate > *)> predicate) const
 Finds the Objects that make predicate true. More...
 
std::vector< Object< Coordinate > * > FindOverlappingIn (const maliput::math::BoundingRegion< Coordinate > &region, const maliput::math::OverlappingType &overlapping_type) const
 Finds the Objects that intersect with a region according to certain overlapping_type. More...
 

Protected Member Functions

 ObjectBook ()=default
 

Constructor & Destructor Documentation

◆ ~ObjectBook()

virtual ~ObjectBook ( )
virtualdefault

◆ ObjectBook()

ObjectBook ( )
protecteddefault

Member Function Documentation

◆ FindById()

Object<Coordinate>* FindById ( const typename Object< Coordinate >::Id &  object_id) const

Finds Object by Id.

Parameters
object_idAn Object::Id.
Returns
A valid Object's pointer if found, nullptr otherwise.

◆ FindByPredicate()

std::vector<Object<Coordinate>*> FindByPredicate ( std::function< bool(const Object< Coordinate > *)>  predicate) const

Finds the Objects that make predicate true.

Parameters
predicateUnary predicate for evaluating an object.

◆ FindOverlappingIn()

std::vector<Object<Coordinate>*> FindOverlappingIn ( const maliput::math::BoundingRegion< Coordinate > &  region,
const maliput::math::OverlappingType &  overlapping_type 
) const

Finds the Objects that intersect with a region according to certain overlapping_type.

Parameters
regionBoundaryRegion used for finding intersected Objects.
overlapping_typeIndicates type of overlapping. See #OverlappingType.
Returns
The Objects intersecting region with the given overlapping_type .

◆ objects()

std::unordered_map<typename Object<Coordinate>::Id, Object<Coordinate>*> objects ( ) const

Gets all the Objects in the book.

Returns
A unordered map, from which key and value are Object::Id and pointer to Object respectively.

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