8 #ifndef IMPALGEBRA_ENDIAN_H
9 #define IMPALGEBRA_ENDIAN_H
11 #include <IMP/algebra/algebra_config.h>
16 IMPALGEBRA_BEGIN_NAMESPACE
27 void IMPALGEBRAEXPORT
reversed_read(
void* dest,
size_t size,
size_t nitems,
28 std::ifstream& f,
bool reverse);
38 size_t nitems, std::ofstream& f,
39 bool reverse =
false);
48 IMPALGEBRA_END_NAMESPACE
bool get_is_big_endian()
Returns 1 if machine is big endian else 0.
bool get_is_little_endian()
Returns 1 if machine is little endian else 0.
void reversed_read(void *dest, size_t size, size_t nitems, std::ifstream &f, bool reverse)
Reads from file in normal or reverse order.
void reversed_write(const void *src, size_t size, size_t nitems, std::ofstream &f, bool reverse=false)
Writes to a file in normal or reversed order.
Various general useful macros for IMP.