SHORE API
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
memops.hpp File Reference

Miscellaneous helpers dealing with memmory access and allocation. More...

Go to the source code of this file.

Classes

class  shore::ptrkeeper
 Clean up heap allocated objects. More...
 
class  shore::mmapping
 Memory mapped file handling. More...
 
class  shore::md5_sum
 MD5 checksum calculation. More...
 

Namespaces

 shore
 SHORE core API.
 

Constant Groups

 shore
 SHORE core API.
 

Typedefs

typedef boost::uint8_t shore::uint8_t
 
typedef boost::uint16_t shore::uint16_t
 
typedef boost::uint32_t shore::uint32_t
 
typedef boost::uint64_t shore::uint64_t
 

Functions

template<class T , int SZ>
size_t shore::size (T(&)[SZ])
 Get the size of a fixed size array.
 
template<class T , int SZ>
T * shore::end (T(&array)[SZ])
 Get the end pointer for a fixed size array.
 
std::ostream & shore::memdump (std::ostream &os, const void *src, size_t n)
 Write a bit-wise dump of a given memory location.
 
void * shore::bit_memcpy (void *const dst, const void *const src, const size_t nbits, const size_t dst_bitofs, const size_t src_bitofs=0)
 Perform a bit-aligned memcpy.
 
uint64_t shore::ntoh64 (const void *const netw64)
 Converts a 64 bit integer from network byte order to host byte order.
 
uint32_t shore::ntoh32 (const void *const netw32)
 Converts a 32 bit integer from network byte order to host byte order.
 
uint16_t shore::ntoh16 (const void *const netw16)
 Converts a 16 bit integer from network byte order to host byte order.
 
uint64_t shore::letoh64 (const void *const le64)
 Converts a 64 bit integer from little endian byte order to host byte order.
 
uint32_t shore::letoh32 (const void *const le32)
 Converts a 32 bit integer from little endian byte order to host byte order.
 
uint16_t shore::letoh16 (const void *const le16)
 Converts a 16 bit integer from little endian byte order to host byte order.
 
uint64_t shore::hton64 (const void *const host64)
 converts a 64 bit integer from host byte order to network byte order */
 
uint32_t shore::hton32 (const void *const host32)
 converts a 32 bit integer from host byte order to network byte order */
 
uint16_t shore::hton16 (const void *const host16)
 converts a 16 bit integer from host byte order to network byte order */
 

Detailed Description

Miscellaneous helpers dealing with memmory access and allocation.

Author
Felix Ott