CVB++ 15.0
Block< T, ACCESSTRAIT >::Row Class Reference

A single row. More...

#include <decl_block.hpp>

Public Member Functions

 Row ()=default
 Default ctor.
 
CVB_FORCE_INLINE PixelType & operator[] (int x) noexcept
 Column access. More...
 
CVB_FORCE_INLINE const PixelType & operator[] (int x) const noexcept
 Column access. More...
 
template<class FromPixelType >
CVB_FORCE_INLINE auto Set (int x, const FromPixelType &value) noexcept -> std::enable_if_t<!std::is_convertible< remove_cvref_t< FromPixelType >, remove_cvref_t< PixelType > >::value, void >
 Column setter. More...
 
CVB_FORCE_INLINE void Set (int x, const PixelType &value) noexcept
 Column setter. More...
 

Detailed Description

template<class T, class ACCESSTRAIT>
class Cvb::Block< T, ACCESSTRAIT >::Row

A single row.

Member Function Documentation

◆ operator[]() [1/2]

CVB_FORCE_INLINE const PixelType & operator[] ( int  x) const
inlinenoexcept

Column access.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
Returns
Pointer to the pixel at the column x.

◆ operator[]() [2/2]

CVB_FORCE_INLINE PixelType & operator[] ( int  x)
inlinenoexcept

Column access.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
Returns
Pointer to the pixel at the column x.

◆ Set() [1/2]

CVB_FORCE_INLINE auto Set ( int  x,
const FromPixelType &  value 
) -> std::enable_if_t<!std::is_convertible<remove_cvref_t<FromPixelType>, remove_cvref_t<PixelType>>::value, void>
inlinenoexcept

Column setter.

Supports any input type for value for which get<I>() is overloaded and has sufficiently many values.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
[in]valueNew pixel value.

◆ Set() [2/2]

CVB_FORCE_INLINE void Set ( int  x,
const PixelType &  value 
)
inlinenoexcept

Column setter.

Supports any input type for value for which get<I>() is overloaded and has sufficiently many values.

Precondition
x must be between 0 and less than the allowed width.
Parameters
[in]xPixel column.
[in]valueNew pixel value.