CARLA
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
carla::sensor::data::Array< T > Class Template Reference

Base class for all the sensor data consisting of an array of items. More...

#include <Array.h>

+ Inheritance diagram for carla::sensor::data::Array< T >:
+ Collaboration diagram for carla::sensor::data::Array< T >:

Public Types

using const_iterator = typename std::add_const< value_type >::type *
 
using const_pointer = typename std::add_const< value_type >::type *
 
using const_reference = typename std::add_const< value_type >::type &
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using iterator = value_type *
 
using pointer = value_type *
 
using reference = value_type &
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using size_type = size_t
 
using value_type = T
 

Public Member Functions

reference at (size_type pos)
 
const_reference at (size_type pos) const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
value_typedata ()
 
const value_typedata () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
reference operator[] (size_type pos)
 
const_reference operator[] (size_type pos) const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
size_type size () const
 
- Public Member Functions inherited from carla::sensor::SensorData
size_t GetFrame () const
 Frame count when the data was generated. More...
 
const rpc::TransformGetSensorTransform () const
 Sensor's transform when the data was generated. More...
 
double GetTimestamp () const
 Simulation-time when the data was generated. More...
 
virtual ~SensorData ()=default
 

Protected Member Functions

template<typename FuncT >
 Array (RawData &&data, FuncT get_offset)
 
 Array (size_t offset, RawData &&data)
 
const RawDataGetRawData () const
 
- Protected Member Functions inherited from carla::sensor::SensorData
const auto & GetEpisode () const
 
 SensorData (size_t frame, double timestamp, const rpc::Transform &sensor_transform)
 
 SensorData (const RawData &data)
 

Private Attributes

RawData _data
 
const size_t _offset
 

Detailed Description

template<typename T>
class carla::sensor::data::Array< T >

Base class for all the sensor data consisting of an array of items.

Definition at line 23 of file Array.h.

Member Typedef Documentation

◆ const_iterator

template<typename T>
using carla::sensor::data::Array< T >::const_iterator = typename std::add_const<value_type>::type *

Definition at line 28 of file Array.h.

◆ const_pointer

template<typename T>
using carla::sensor::data::Array< T >::const_pointer = typename std::add_const<value_type>::type *

Definition at line 33 of file Array.h.

◆ const_reference

template<typename T>
using carla::sensor::data::Array< T >::const_reference = typename std::add_const<value_type>::type &

Definition at line 35 of file Array.h.

◆ const_reverse_iterator

template<typename T>
using carla::sensor::data::Array< T >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 30 of file Array.h.

◆ iterator

template<typename T>
using carla::sensor::data::Array< T >::iterator = value_type *

Definition at line 27 of file Array.h.

◆ pointer

template<typename T>
using carla::sensor::data::Array< T >::pointer = value_type *

Definition at line 32 of file Array.h.

◆ reference

template<typename T>
using carla::sensor::data::Array< T >::reference = value_type &

Definition at line 34 of file Array.h.

◆ reverse_iterator

template<typename T>
using carla::sensor::data::Array< T >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 29 of file Array.h.

◆ size_type

template<typename T>
using carla::sensor::data::Array< T >::size_type = size_t

Definition at line 31 of file Array.h.

◆ value_type

template<typename T>
using carla::sensor::data::Array< T >::value_type = T

Definition at line 26 of file Array.h.

Constructor & Destructor Documentation

◆ Array() [1/2]

template<typename T>
template<typename FuncT >
carla::sensor::data::Array< T >::Array ( RawData &&  data,
FuncT  get_offset 
)
inlineexplicitprotected

Definition at line 127 of file Array.h.

◆ Array() [2/2]

template<typename T>
carla::sensor::data::Array< T >::Array ( size_t  offset,
RawData &&  data 
)
inlineexplicitprotected

Definition at line 136 of file Array.h.

Member Function Documentation

◆ at() [1/2]

template<typename T>
reference carla::sensor::data::Array< T >::at ( size_type  pos)
inline

Definition at line 110 of file Array.h.

◆ at() [2/2]

template<typename T>
const_reference carla::sensor::data::Array< T >::at ( size_type  pos) const
inline

Definition at line 117 of file Array.h.

◆ begin() [1/2]

template<typename T>
iterator carla::sensor::data::Array< T >::begin ( )
inline

◆ begin() [2/2]

template<typename T>
const_iterator carla::sensor::data::Array< T >::begin ( ) const
inline

Definition at line 45 of file Array.h.

◆ cbegin()

template<typename T>
const_iterator carla::sensor::data::Array< T >::cbegin ( ) const
inline

Definition at line 41 of file Array.h.

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::begin(), and carla::sensor::data::Array< data::SemanticLidarDetection >::crbegin().

+ Here is the caller graph for this function:

◆ cend()

template<typename T>
const_iterator carla::sensor::data::Array< T >::cend ( ) const
inline

Definition at line 53 of file Array.h.

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::crend(), and carla::sensor::data::Array< data::SemanticLidarDetection >::end().

+ Here is the caller graph for this function:

◆ crbegin()

template<typename T>
const_reverse_iterator carla::sensor::data::Array< T >::crbegin ( ) const
inline

Definition at line 65 of file Array.h.

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::rbegin().

+ Here is the caller graph for this function:

◆ crend()

template<typename T>
const_reverse_iterator carla::sensor::data::Array< T >::crend ( ) const
inline

Definition at line 77 of file Array.h.

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::rend().

+ Here is the caller graph for this function:

◆ data() [1/2]

template<typename T>
value_type* carla::sensor::data::Array< T >::data ( )
inline

Definition at line 94 of file Array.h.

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::operator[]().

+ Here is the caller graph for this function:

◆ data() [2/2]

template<typename T>
const value_type* carla::sensor::data::Array< T >::data ( ) const
inline

Definition at line 98 of file Array.h.

◆ empty()

template<typename T>
bool carla::sensor::data::Array< T >::empty ( ) const
inline

Definition at line 85 of file Array.h.

◆ end() [1/2]

template<typename T>
iterator carla::sensor::data::Array< T >::end ( )
inline

Definition at line 49 of file Array.h.

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::Array(), carla::sensor::data::Array< data::SemanticLidarDetection >::empty(), carla::sensor::data::Array< data::SemanticLidarDetection >::rend(), and carla::sensor::data::Array< data::SemanticLidarDetection >::size().

+ Here is the caller graph for this function:

◆ end() [2/2]

template<typename T>
const_iterator carla::sensor::data::Array< T >::end ( ) const
inline

Definition at line 57 of file Array.h.

◆ GetRawData()

template<typename T>
const RawData& carla::sensor::data::Array< T >::GetRawData ( ) const
inlineprotected

Definition at line 139 of file Array.h.

◆ operator[]() [1/2]

template<typename T>
reference carla::sensor::data::Array< T >::operator[] ( size_type  pos)
inline

Definition at line 102 of file Array.h.

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::at().

+ Here is the caller graph for this function:

◆ operator[]() [2/2]

template<typename T>
const_reference carla::sensor::data::Array< T >::operator[] ( size_type  pos) const
inline

Definition at line 106 of file Array.h.

◆ rbegin() [1/2]

template<typename T>
reverse_iterator carla::sensor::data::Array< T >::rbegin ( )
inline

Definition at line 61 of file Array.h.

◆ rbegin() [2/2]

template<typename T>
const_reverse_iterator carla::sensor::data::Array< T >::rbegin ( ) const
inline

Definition at line 69 of file Array.h.

◆ rend() [1/2]

template<typename T>
reverse_iterator carla::sensor::data::Array< T >::rend ( )
inline

Definition at line 73 of file Array.h.

◆ rend() [2/2]

template<typename T>
const_reverse_iterator carla::sensor::data::Array< T >::rend ( ) const
inline

Definition at line 81 of file Array.h.

◆ size()

template<typename T>
size_type carla::sensor::data::Array< T >::size ( ) const
inline

Definition at line 89 of file Array.h.

Referenced by carla::sensor::data::Array< data::SemanticLidarDetection >::at(), and carla::client::detail::EpisodeState::EpisodeState().

+ Here is the caller graph for this function:

Member Data Documentation

◆ _data

template<typename T>
RawData carla::sensor::data::Array< T >::_data
private

◆ _offset

template<typename T>
const size_t carla::sensor::data::Array< T >::_offset
private

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