LocalGuidance
A library that generates velocity references to follow a path.
std_utils::smart_pointer_iterator< base_iterator_, element_type_ > Class Template Reference

An iterator for smart pointers which skips the smart pointer layer by exposing a pointer to the internal type. Can used in range-based for loops. More...

#include <SmartPointerIterator.hpp>

Inheritance diagram for std_utils::smart_pointer_iterator< base_iterator_, element_type_ >:
Inheritance graph

Public Types

using base_iterator = base_iterator_
 
using value_type = typename base_iterator::value_type
 
using element_type = element_type_
 
using pointer = element_type *const
 
using ppointer = pointer *const
 

Public Member Functions

 smart_pointer_iterator (const base_iterator &other)
 
pointer operator* ()
 Overload the dereference operator to access a pointer to element_type. More...
 
ppointer operator-> ()
 Overload the member access operator to access a pointer to element_type. More...
 

Detailed Description

template<typename base_iterator_, typename element_type_>
class std_utils::smart_pointer_iterator< base_iterator_, element_type_ >

An iterator for smart pointers which skips the smart pointer layer by exposing a pointer to the internal type. Can used in range-based for loops.

Template Parameters
base_iterator_Type of the base iterator
element_type_This template parameter is necessary to help the IDE's autocomplete

Member Typedef Documentation

template<typename base_iterator_ , typename element_type_ >
using std_utils::smart_pointer_iterator< base_iterator_, element_type_ >::base_iterator = base_iterator_
template<typename base_iterator_ , typename element_type_ >
using std_utils::smart_pointer_iterator< base_iterator_, element_type_ >::element_type = element_type_
template<typename base_iterator_ , typename element_type_ >
using std_utils::smart_pointer_iterator< base_iterator_, element_type_ >::pointer = element_type * const
template<typename base_iterator_ , typename element_type_ >
using std_utils::smart_pointer_iterator< base_iterator_, element_type_ >::ppointer = pointer * const
template<typename base_iterator_ , typename element_type_ >
using std_utils::smart_pointer_iterator< base_iterator_, element_type_ >::value_type = typename base_iterator::value_type

Constructor & Destructor Documentation

template<typename base_iterator_ , typename element_type_ >
std_utils::smart_pointer_iterator< base_iterator_, element_type_ >::smart_pointer_iterator ( const base_iterator other)
inlineexplicit

Member Function Documentation

template<typename base_iterator_ , typename element_type_ >
pointer std_utils::smart_pointer_iterator< base_iterator_, element_type_ >::operator* ( )
inline

Overload the dereference operator to access a pointer to element_type.

template<typename base_iterator_ , typename element_type_ >
ppointer std_utils::smart_pointer_iterator< base_iterator_, element_type_ >::operator-> ( )
inline

Overload the member access operator to access a pointer to element_type.


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