40 #ifndef PCL_IO_PLY_BYTE_ORDER_H
41 #define PCL_IO_PLY_BYTE_ORDER_H
43 #include <boost/detail/endian.hpp>
61 #if defined(BOOST_BIG_ENDIAN)
63 #elif defined(BOOST_LITTLE_ENDIAN)
66 #error "unable to determine system endianness"
71 template <std::
size_t N>
80 std::swap (bytes[0], bytes[1]);
86 std::swap (bytes[0], bytes[3]);
87 std::swap (bytes[1], bytes[2]);
93 std::swap (bytes[0], bytes[7]);
94 std::swap (bytes[1], bytes[6]);
95 std::swap (bytes[2], bytes[5]);
96 std::swap (bytes[3], bytes[4]);
102 swap_byte_order<sizeof (T)> (
reinterpret_cast<char*
> (&value));
109 #endif // PLY_BYTE_ORDER_H
void swap_byte_order< 8 >(char *bytes)
void swap_byte_order< 4 >(char *bytes)
void swap_byte_order< 1 >(char *)
void swap_byte_order(char *bytes)
void swap_byte_order< 2 >(char *bytes)