NVIDIA DeepStream SDK API Reference

9.2 Release
sdk::common::CircularBufferRange< T > Class Template Reference

Detailed Description

template<class T>
class sdk::common::CircularBufferRange< T >

A non-owning view into a range of elements in a circular buffer.

Definition at line 22 of file includes/opentelemetry/sdk/common/circular_buffer_range.h.

Public Member Functions

 CircularBufferRange () noexcept=default
 
 CircularBufferRange (nostd::span< T > first) noexcept
 
 CircularBufferRange (nostd::span< T > first, nostd::span< T > second) noexcept
 
 operator CircularBufferRange< const T > () const noexcept
 
template<class Callback >
bool ForEach (Callback callback) const noexcept(noexcept(std::declval< Callback >()(std::declval< T & >())))
 Iterate over the elements in the range. More...
 
size_t size () const noexcept
 
bool empty () const noexcept
 
CircularBufferRange Take (size_t n) const noexcept
 Return a subrange taken from the start of this range. More...
 
 CircularBufferRange () noexcept=default
 
 CircularBufferRange (nostd::span< T > first) noexcept
 
 CircularBufferRange (nostd::span< T > first, nostd::span< T > second) noexcept
 
 operator CircularBufferRange< const T > () const noexcept
 
template<class Callback >
bool ForEach (Callback callback) const noexcept(noexcept(std::declval< Callback >()(std::declval< T & >())))
 Iterate over the elements in the range. More...
 
size_t size () const noexcept
 
bool empty () const noexcept
 
CircularBufferRange Take (size_t n) const noexcept
 Return a subrange taken from the start of this range. More...
 

Constructor & Destructor Documentation

◆ CircularBufferRange() [1/6]

template<class T >
sdk::common::CircularBufferRange< T >::CircularBufferRange ( )
defaultnoexcept

◆ CircularBufferRange() [2/6]

template<class T >
sdk::common::CircularBufferRange< T >::CircularBufferRange ( nostd::span< T >  first)
inlineexplicitnoexcept

◆ CircularBufferRange() [3/6]

template<class T >
sdk::common::CircularBufferRange< T >::CircularBufferRange ( nostd::span< T >  first,
nostd::span< T >  second 
)
inlinenoexcept

◆ CircularBufferRange() [4/6]

template<class T >
sdk::common::CircularBufferRange< T >::CircularBufferRange ( )
defaultnoexcept

◆ CircularBufferRange() [5/6]

template<class T >
sdk::common::CircularBufferRange< T >::CircularBufferRange ( nostd::span< T >  first)
inlineexplicitnoexcept

◆ CircularBufferRange() [6/6]

template<class T >
sdk::common::CircularBufferRange< T >::CircularBufferRange ( nostd::span< T >  first,
nostd::span< T >  second 
)
inlinenoexcept

Member Function Documentation

◆ empty() [1/2]

template<class T >
bool sdk::common::CircularBufferRange< T >::empty ( ) const
inlinenoexcept
Returns
true if the range is empty

Definition at line 69 of file includes/opentelemetry/sdk/common/circular_buffer_range.h.

References nostd::span< T, Extent >::empty().

◆ empty() [2/2]

template<class T >
bool sdk::common::CircularBufferRange< T >::empty ( ) const
inlinenoexcept
Returns
true if the range is empty

Definition at line 69 of file 9.2/includes/opentelemetry/sdk/common/circular_buffer_range.h.

References nostd::span< T, Extent >::empty().

◆ ForEach() [1/2]

template<class T >
template<class Callback >
bool sdk::common::CircularBufferRange< T >::ForEach ( Callback  callback) const
inlinenoexcept

Iterate over the elements in the range.

Parameters
callbackthe callback to call for each element
Returns
true if we iterated over all elements

Definition at line 41 of file includes/opentelemetry/sdk/common/circular_buffer_range.h.

◆ ForEach() [2/2]

template<class T >
template<class Callback >
bool sdk::common::CircularBufferRange< T >::ForEach ( Callback  callback) const
inlinenoexcept

Iterate over the elements in the range.

Parameters
callbackthe callback to call for each element
Returns
true if we iterated over all elements

Definition at line 41 of file 9.2/includes/opentelemetry/sdk/common/circular_buffer_range.h.

◆ operator CircularBufferRange< const T >() [1/2]

template<class T >
sdk::common::CircularBufferRange< T >::operator CircularBufferRange< const T > ( ) const
inlinenoexcept

◆ operator CircularBufferRange< const T >() [2/2]

template<class T >
sdk::common::CircularBufferRange< T >::operator CircularBufferRange< const T > ( ) const
inlinenoexcept

◆ size() [1/2]

template<class T >
size_t sdk::common::CircularBufferRange< T >::size ( ) const
inlinenoexcept
Returns
the number of elements in the range

Definition at line 64 of file 9.2/includes/opentelemetry/sdk/common/circular_buffer_range.h.

References nostd::span< T, Extent >::size().

◆ size() [2/2]

template<class T >
size_t sdk::common::CircularBufferRange< T >::size ( ) const
inlinenoexcept
Returns
the number of elements in the range

Definition at line 64 of file includes/opentelemetry/sdk/common/circular_buffer_range.h.

References nostd::span< T, Extent >::size().

Referenced by sdk::common::CircularBufferRange< T >::Take().

◆ Take() [1/2]

template<class T >
CircularBufferRange sdk::common::CircularBufferRange< T >::Take ( size_t  n) const
inlinenoexcept

Return a subrange taken from the start of this range.

Parameters
nthe number of element to take in the subrange
Returns
a subrange of the first n elements in this range

Definition at line 76 of file 9.2/includes/opentelemetry/sdk/common/circular_buffer_range.h.

References nostd::span< T, Extent >::data(), sdk::common::CircularBufferRange< T >::size(), and nostd::span< T, Extent >::size().

◆ Take() [2/2]

template<class T >
CircularBufferRange sdk::common::CircularBufferRange< T >::Take ( size_t  n) const
inlinenoexcept

Return a subrange taken from the start of this range.

Parameters
nthe number of element to take in the subrange
Returns
a subrange of the first n elements in this range

Definition at line 76 of file includes/opentelemetry/sdk/common/circular_buffer_range.h.

References nostd::span< T, Extent >::data(), sdk::common::CircularBufferRange< T >::size(), and nostd::span< T, Extent >::size().


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