39 #ifndef DATRW_BYTESEX_H_VERSION 41 #define DATRW_BYTESEX_H_VERSION \ 42 "DATRW_BYTESEX_H V1.1" 133 for (
unsigned int i=0; i<
sizeof(T); i++)
134 { result.
bytes[i]=value.
bytes[
sizeof(T)-i-1]; }
160 int magic(
const char*
const cmagic);
187 const bool& fortranmode=
false);
199 const bool& fortranmode=
false);
205 #endif // DATRW_BYTESEX_H_VERSION (includeguard) The bytesex of the file matches this machine.
Ecpu_type cpu()
check for my CPU model
Emagic_type file_magic_test(std::istream &is, const char *const cmagic, const bool &fortranmode)
check magic number in file
Ecpu_type
Define different CPU type that are recognized.
The magic number does match the file.
T swap(const T &value)
How to swap any generic type.
Root namespace of library.
The bytesex of the file must be swapped to match this machine.
int magic(const char *const cmagic)
function to create the magic number
Emagic_type
Define bytesex indicator for magic number test.
void file_magic_write(std::ostream &os, const char *const cmagic, const bool &fortranmode)
write magic number to file