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

#include <pixel_format.hpp>

Public Member Functions

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

Detailed Description

Definition at line 169 of file pixel_format.hpp.

Member Function Documentation

◆ operator()()

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

Definition at line 172 of file pixel_format.hpp.

173 {
175 begin <= end, "PixelByteSwapper: begin iterator must not be after end iterator");
176 // Assumes 16-bit data: swap each pair of bytes in-place
177 for(auto it = begin; it != end; ++it) {
178 auto next = std::next(it);
179 if(next == end)
180 break;
181 std::iter_swap(it, next);
182 ++it;
183 }
184 }
#define IRSOL_ASSERT_ERROR
Error-level assertion macro.
Definition assert.hpp:134

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