Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
SysUtil.hpp File Reference
#include <cstring>
#include <cstdio>
#include <iosfwd>
+ Include dependency graph for SysUtil.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 moab
 Class representing axis-aligned bounding box.
 
 moab::SysUtil
 

Functions

void moab::SysUtil::setmem (void *mem, const void *value, unsigned value_size, size_t num_elem)
 Similar to memset, but accepts values larger than 1 char. More...
 
long moab::SysUtil::filesize (FILE *filp)
 Get size of file (if it is a regular file) More...
 
long moab::SysUtil::filesize (std::ifstream &str)
 Get size of file (if it is a regular file) More...
 
bool moab::SysUtil::little_endian ()
 Check if platform is little-endian. More...
 
bool moab::SysUtil::big_endian ()
 Check if platform is big-endian. More...
 
void moab::SysUtil::byteswap (void *data, unsigned value_size, size_t num_elem)
 Swap byte order (e.g. change from big-endian to little-endian) More...
 
void moab::SysUtil::byteswap2 (void *data, size_t num_elem)
 Alternate byteswap optimized for 2-byte values. More...
 
void moab::SysUtil::byteswap4 (void *data, size_t num_elem)
 Alternate byteswap optimized for 4-byte values. More...
 
void moab::SysUtil::byteswap8 (void *data, size_t num_elem)
 Alternate byteswap optimized for 8-byte values. More...
 
template<typename T >
void moab::SysUtil::byteswap (T *data, size_t num_elem)
 Type-specific byte swap. More...