CARLA
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
carla::client::ActorList Class Reference

#include <ActorList.h>

+ Inheritance diagram for carla::client::ActorList:
+ Collaboration diagram for carla::client::ActorList:

Public Member Functions

SharedPtr< Actorat (size_t pos) const
 
auto begin () const
 
bool empty () const
 
auto end () const
 
SharedPtr< ActorListFilter (const std::string &wildcard_pattern) const
 Filters a list of Actor with type id matching wildcard_pattern. More...
 
SharedPtr< ActorFind (ActorId actor_id) const
 Find an actor by id. More...
 
SharedPtr< Actoroperator[] (size_t pos) const
 
size_t size () const
 

Private Member Functions

 ActorList (detail::EpisodeProxy episode, std::vector< rpc::Actor > actors)
 
template<typename It >
auto MakeIterator (It it) const
 

Private Attributes

std::vector< detail::ActorVariant_actors
 
detail::EpisodeProxy _episode
 

Friends

class World
 

Detailed Description

Definition at line 18 of file ActorList.h.

Constructor & Destructor Documentation

◆ ActorList()

carla::client::ActorList::ActorList ( detail::EpisodeProxy  episode,
std::vector< rpc::Actor actors 
)
private

Definition at line 17 of file ActorList.cpp.

Referenced by Filter().

+ Here is the caller graph for this function:

Member Function Documentation

◆ at()

SharedPtr<Actor> carla::client::ActorList::at ( size_t  pos) const
inline

Definition at line 40 of file ActorList.h.

References _actors, and _episode.

◆ begin()

auto carla::client::ActorList::begin ( ) const
inline

Definition at line 44 of file ActorList.h.

References _actors, and MakeIterator().

+ Here is the call graph for this function:

◆ empty()

bool carla::client::ActorList::empty ( ) const
inline

Definition at line 52 of file ActorList.h.

References _actors.

◆ end()

auto carla::client::ActorList::end ( ) const
inline

Definition at line 48 of file ActorList.h.

References _actors, and MakeIterator().

+ Here is the call graph for this function:

◆ Filter()

SharedPtr< ActorList > carla::client::ActorList::Filter ( const std::string &  wildcard_pattern) const

Filters a list of Actor with type id matching wildcard_pattern.

Definition at line 32 of file ActorList.cpp.

References _actors, _episode, ActorList(), and carla::StringUtil::Match().

Referenced by MakeIterator().

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

◆ Find()

SharedPtr< Actor > carla::client::ActorList::Find ( ActorId  actor_id) const

Find an actor by id.

Definition at line 23 of file ActorList.cpp.

References _actors, and _episode.

Referenced by MakeIterator().

+ Here is the caller graph for this function:

◆ MakeIterator()

template<typename It >
auto carla::client::ActorList::MakeIterator ( It  it) const
inlineprivate

Definition at line 22 of file ActorList.h.

References _episode, Filter(), and Find().

Referenced by begin(), and end().

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

◆ operator[]()

SharedPtr<Actor> carla::client::ActorList::operator[] ( size_t  pos) const
inline

Definition at line 36 of file ActorList.h.

References _actors, and _episode.

◆ size()

size_t carla::client::ActorList::size ( ) const
inline

Definition at line 56 of file ActorList.h.

References _actors.

Friends And Related Function Documentation

◆ World

friend class World
friend

Definition at line 62 of file ActorList.h.

Member Data Documentation

◆ _actors

std::vector<detail::ActorVariant> carla::client::ActorList::_actors
private

Definition at line 68 of file ActorList.h.

Referenced by at(), begin(), empty(), end(), Filter(), Find(), operator[](), and size().

◆ _episode

detail::EpisodeProxy carla::client::ActorList::_episode
private

Definition at line 66 of file ActorList.h.

Referenced by at(), Filter(), Find(), MakeIterator(), and operator[]().


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