OTB  9.0.0
Orfeo Toolbox
Public Member Functions | Private Attributes | List of all members
otb::NotNull< T > Class Template Reference

#include <otbNotNull.h>

+ Inheritance diagram for otb::NotNull< T >:
+ Collaboration diagram for otb::NotNull< T >:

Public Member Functions

constexpr T get () const
 
 NotNull (std::nullptr_t)=delete
 
constexpr NotNull (T p)
 
constexpr operator T () const
 
constexpr decltype(auto) operator* () const
 
NotNulloperator++ ()=delete
 
NotNull operator++ (int)=delete
 
NotNulloperator+= (std::ptrdiff_t)=delete
 
NotNulloperator-- ()=delete
 
NotNull operator-- (int)=delete
 
NotNulloperator-= (std::ptrdiff_t)=delete
 
constexpr T operator-> () const
 
NotNulloperator= (std::nullptr_t)=delete
 
void operator[] (std::ptrdiff_t) const =delete
 

Private Attributes

m_p
 

Detailed Description

template<typename T>
class otb::NotNull< T >

Simplified version of GSL::not_null.

Permits to holds pointers that shall never be null.

GSL::not_null is under MIT licence

Definition at line 37 of file otbNotNull.h.

Constructor & Destructor Documentation

◆ NotNull() [1/2]

template<typename T >
constexpr otb::NotNull< T >::NotNull ( p)
inlineconstexpr

Definition at line 40 of file otbNotNull.h.

◆ NotNull() [2/2]

template<typename T >
otb::NotNull< T >::NotNull ( std::nullptr_t  )
delete

Member Function Documentation

◆ get()

template<typename T >
constexpr T otb::NotNull< T >::get ( ) const
inlineconstexpr

◆ operator T()

template<typename T >
constexpr otb::NotNull< T >::operator T ( ) const
inlineconstexpr

Definition at line 51 of file otbNotNull.h.

References otb::NotNull< T >::get().

◆ operator*()

template<typename T >
constexpr decltype(auto) otb::NotNull< T >::operator* ( ) const
inlineconstexpr

Definition at line 53 of file otbNotNull.h.

◆ operator++() [1/2]

template<typename T >
NotNull& otb::NotNull< T >::operator++ ( )
delete

◆ operator++() [2/2]

template<typename T >
NotNull otb::NotNull< T >::operator++ ( int  )
delete

◆ operator+=()

template<typename T >
NotNull& otb::NotNull< T >::operator+= ( std::ptrdiff_t  )
delete

◆ operator--() [1/2]

template<typename T >
NotNull& otb::NotNull< T >::operator-- ( )
delete

◆ operator--() [2/2]

template<typename T >
NotNull otb::NotNull< T >::operator-- ( int  )
delete

◆ operator-=()

template<typename T >
NotNull& otb::NotNull< T >::operator-= ( std::ptrdiff_t  )
delete

◆ operator->()

template<typename T >
constexpr T otb::NotNull< T >::operator-> ( ) const
inlineconstexpr

Definition at line 52 of file otbNotNull.h.

◆ operator=()

template<typename T >
NotNull& otb::NotNull< T >::operator= ( std::nullptr_t  )
delete

◆ operator[]()

template<typename T >
void otb::NotNull< T >::operator[] ( std::ptrdiff_t  ) const
delete

Member Data Documentation

◆ m_p

template<typename T >
T otb::NotNull< T >::m_p
private

Definition at line 65 of file otbNotNull.h.

Referenced by otb::NotNull< PixelType * >::get().


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