HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime::ConstPointerContainer< Container > Class Template Reference

#include <const_pointer_container.h>

Classes

class  ConstIterator
 

Public Types

using T = typename std::remove_pointer< typename Container::value_type >::type
 

Public Member Functions

 ConstPointerContainer (const Container &data) noexcept
 
size_t size () const noexcept
 
bool empty () const noexcept
 
ConstIterator cbegin () const noexcept
 
ConstIterator cend () const noexcept
 
ConstIterator begin () const noexcept
 
ConstIterator end () const noexcept
 
const Toperator[] (size_t index) const
 
const Tat (size_t index) const
 

Detailed Description

template<typename Container>
class onnxruntime::ConstPointerContainer< Container >

Container has T* entries. e.g. std::vector<T*>, and this class provides const access to those via iterators and direct access, as the standard behavior only makes the pointer constant, and not what is pointed too. i.e. you get a const pointer to T not a pointer to const T without this wrapper. See https://stackoverflow.com/questions/8017036/understanding-const-iterator-with-pointers

Definition at line 16 of file const_pointer_container.h.

Member Typedef Documentation

template<typename Container >
using onnxruntime::ConstPointerContainer< Container >::T = typename std::remove_pointer<typename Container::value_type>::type

Definition at line 18 of file const_pointer_container.h.

Constructor & Destructor Documentation

template<typename Container >
onnxruntime::ConstPointerContainer< Container >::ConstPointerContainer ( const Container &  data)
inlineexplicitnoexcept

Construct wrapper class that will provide const access to the pointers in a container of non-const pointers.

Parameters
dataContainer with non-const pointers. e.g. std::vector<T*>

Definition at line 64 of file const_pointer_container.h.

Member Function Documentation

template<typename Container >
const T* onnxruntime::ConstPointerContainer< Container >::at ( size_t  index) const
inline

Definition at line 77 of file const_pointer_container.h.

template<typename Container >
ConstIterator onnxruntime::ConstPointerContainer< Container >::begin ( void  ) const
inlinenoexcept

Definition at line 72 of file const_pointer_container.h.

template<typename Container >
ConstIterator onnxruntime::ConstPointerContainer< Container >::cbegin ( ) const
inlinenoexcept

Definition at line 69 of file const_pointer_container.h.

template<typename Container >
ConstIterator onnxruntime::ConstPointerContainer< Container >::cend ( ) const
inlinenoexcept

Definition at line 70 of file const_pointer_container.h.

template<typename Container >
bool onnxruntime::ConstPointerContainer< Container >::empty ( void  ) const
inlinenoexcept

Definition at line 67 of file const_pointer_container.h.

template<typename Container >
ConstIterator onnxruntime::ConstPointerContainer< Container >::end ( void  ) const
inlinenoexcept

Definition at line 73 of file const_pointer_container.h.

template<typename Container >
const T* onnxruntime::ConstPointerContainer< Container >::operator[] ( size_t  index) const
inline

Definition at line 75 of file const_pointer_container.h.

template<typename Container >
size_t onnxruntime::ConstPointerContainer< Container >::size ( void  ) const
inlinenoexcept

Definition at line 66 of file const_pointer_container.h.


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