CARLA
Public Types | Public Member Functions | Private Attributes | List of all members
carla::ListView< IT > Class Template Reference

A view over a range of elements in a container. More...

#include <ListView.h>

+ Collaboration diagram for carla::ListView< IT >:

Public Types

using const_iterator = typename std::add_const< IT >::type
 
using difference_type = typename std::iterator_traits< iterator >::difference_type
 
using iterator = IT
 
using pointer = typename std::iterator_traits< iterator >::pointer
 
using reference = typename std::iterator_traits< iterator >::reference
 
using size_type = size_t
 
using value_type = typename std::iterator_traits< iterator >::value_type
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
 ListView (iterator begin, iterator end)
 
 ListView (const ListView &)=default
 
ListViewoperator= (const ListView &)=delete
 
size_type size () const
 

Private Attributes

const iterator _begin
 
const iterator _end
 

Detailed Description

template<typename IT>
class carla::ListView< IT >

A view over a range of elements in a container.

Basically a pair of begin and end iterators.

Definition at line 19 of file LibCarla/source/carla/ListView.h.

Member Typedef Documentation

◆ const_iterator

template<typename IT>
using carla::ListView< IT >::const_iterator = typename std::add_const<IT>::type

Definition at line 23 of file LibCarla/source/carla/ListView.h.

◆ difference_type

template<typename IT>
using carla::ListView< IT >::difference_type = typename std::iterator_traits<iterator>::difference_type

Definition at line 25 of file LibCarla/source/carla/ListView.h.

◆ iterator

template<typename IT>
using carla::ListView< IT >::iterator = IT

Definition at line 22 of file LibCarla/source/carla/ListView.h.

◆ pointer

template<typename IT>
using carla::ListView< IT >::pointer = typename std::iterator_traits<iterator>::pointer

Definition at line 27 of file LibCarla/source/carla/ListView.h.

◆ reference

template<typename IT>
using carla::ListView< IT >::reference = typename std::iterator_traits<iterator>::reference

Definition at line 28 of file LibCarla/source/carla/ListView.h.

◆ size_type

template<typename IT>
using carla::ListView< IT >::size_type = size_t

Definition at line 24 of file LibCarla/source/carla/ListView.h.

◆ value_type

template<typename IT>
using carla::ListView< IT >::value_type = typename std::iterator_traits<iterator>::value_type

Definition at line 26 of file LibCarla/source/carla/ListView.h.

Constructor & Destructor Documentation

◆ ListView() [1/2]

template<typename IT>
carla::ListView< IT >::ListView ( iterator  begin,
iterator  end 
)
inlineexplicit

Definition at line 30 of file LibCarla/source/carla/ListView.h.

References carla::ListView< IT >::_begin, carla::ListView< IT >::_end, DEBUG_ASSERT, and carla::ListView< IT >::operator=().

+ Here is the call graph for this function:

◆ ListView() [2/2]

template<typename IT>
carla::ListView< IT >::ListView ( const ListView< IT > &  )
default

Member Function Documentation

◆ begin() [1/2]

template<typename IT>
iterator carla::ListView< IT >::begin ( )
inline

Definition at line 38 of file LibCarla/source/carla/ListView.h.

References carla::ListView< IT >::_begin.

Referenced by carla::MakeListView(), and carla::ListView< IT >::size().

+ Here is the caller graph for this function:

◆ begin() [2/2]

template<typename IT>
const_iterator carla::ListView< IT >::begin ( ) const
inline

Definition at line 42 of file LibCarla/source/carla/ListView.h.

References carla::ListView< IT >::_begin.

◆ cbegin()

template<typename IT>
const_iterator carla::ListView< IT >::cbegin ( ) const
inline

Definition at line 46 of file LibCarla/source/carla/ListView.h.

References carla::ListView< IT >::_begin.

◆ cend()

template<typename IT>
const_iterator carla::ListView< IT >::cend ( ) const
inline

Definition at line 58 of file LibCarla/source/carla/ListView.h.

References carla::ListView< IT >::_end.

◆ empty()

template<typename IT>
bool carla::ListView< IT >::empty ( ) const
inline

◆ end() [1/2]

template<typename IT>
iterator carla::ListView< IT >::end ( )
inline

Definition at line 50 of file LibCarla/source/carla/ListView.h.

References carla::ListView< IT >::_end.

Referenced by carla::MakeListView(), and carla::ListView< IT >::size().

+ Here is the caller graph for this function:

◆ end() [2/2]

template<typename IT>
const_iterator carla::ListView< IT >::end ( ) const
inline

Definition at line 54 of file LibCarla/source/carla/ListView.h.

References carla::ListView< IT >::_end.

◆ operator=()

template<typename IT>
ListView& carla::ListView< IT >::operator= ( const ListView< IT > &  )
delete

Referenced by carla::ListView< IT >::ListView().

+ Here is the caller graph for this function:

◆ size()

template<typename IT>
size_type carla::ListView< IT >::size ( ) const
inline

Definition at line 66 of file LibCarla/source/carla/ListView.h.

References carla::ListView< IT >::begin(), and carla::ListView< IT >::end().

+ Here is the call graph for this function:

Member Data Documentation

◆ _begin

template<typename IT>
const iterator carla::ListView< IT >::_begin
private

◆ _end

template<typename IT>
const iterator carla::ListView< IT >::_end
private

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