IRSOL
C++ code implementing socket server for interacting with Baumer camera.
irsol::camera::PixelByteSwapper< swap > Struct Template Reference

Utility for swapping pixel bytes in a buffer. More...

#include <pixel_format.hpp>

Public Member Functions

template<typename Iterator >
void operator() (IRSOL_MAYBE_UNUSED Iterator begin, IRSOL_MAYBE_UNUSED Iterator end) const
 

Detailed Description

template<bool swap>
struct irsol::camera::PixelByteSwapper< swap >

Utility for swapping pixel bytes in a buffer.

The default (swap=false) does nothing. The specialization for swap=true swaps bytes for 16-bit data (i.e., swaps each pair of bytes in the range).

Usage: PixelByteSwapper<true>()(vec.begin(), vec.end()); // swaps bytes in-place PixelByteSwapper<false>()(vec.begin(), vec.end()); // no-op

Definition at line 157 of file pixel_format.hpp.

Member Function Documentation

◆ operator()()

template<bool swap>
template<typename Iterator >
void irsol::camera::PixelByteSwapper< swap >::operator() ( IRSOL_MAYBE_UNUSED Iterator  begin,
IRSOL_MAYBE_UNUSED Iterator  end 
) const
inline

Definition at line 160 of file pixel_format.hpp.

161 {
163 begin <= end, "PixelByteSwapper: begin iterator must not be after end iterator");
164 // No-op for swap == false
165 }
#define IRSOL_ASSERT_ERROR
Error-level assertion macro.
Definition assert.hpp:134

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