28#ifndef itkByteSwapper_h
29#define itkByteSwapper_h
35#if __has_include(<version>)
38#if defined(__cpp_lib_endian)
68#ifndef ITK_FUTURE_LEGACY_REMOVE
71 [[deprecated(
"ByteSwapper::OStreamType is deprecated from ITK 6. Just use `std::ostream` instead!")]] =
174#if defined(__cpp_lib_endian)
175 std::endian::native == std::endian::big
176#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__)
177 __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
178#elif defined(__BIG_ENDIAN__)
180#elif defined(__LITTLE_ENDIAN__) || defined(_WIN32)
183# error "The byte order of the target architecture is unknown to this compiler."
189#ifndef ITK_MANUAL_INSTANTIATION
190# include "itkByteSwapper.hxx"
static void SwapBytes(T &)
static constexpr bool SystemIsBE()
static void SwapWriteRange(const T *buffer, SizeValueType numberOfElements, std::ostream &outputStream)
static void SwapWriteRangeFromSystemToLittleEndian(const T *p, int num, std::ostream *fp)
SmartPointer< const Self > ConstPointer
static constexpr bool SystemIsBigEndian()
static constexpr bool m_SystemIsBigEndian
static constexpr bool SystemIsLE()
static void SwapRangeFromSystemToLittleEndian(T *p, BufferSizeType num)
SizeValueType BufferSizeType
~ByteSwapper() override=default
static constexpr bool SystemIsLittleEndian()
static void SwapWriteRangeFromSystemToBigEndian(const T *p, int num, std::ostream *fp)
static void SwapFromSystemToLittleEndian(T *p)
SmartPointer< Self > Pointer
static void SwapRangeFromSystemToBigEndian(T *p, BufferSizeType num)
static void SwapFromSystemToBigEndian(T *p)
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType