Home Libraries Author Links

stm::buffer Namespace Reference
[DivAids: Diverse Aids]


Detailed Description

Namespace containing all buffer related utilities.


Functions

template<typename T>
T & get (byte *ptr)
 Returns a reference to the T object beginning at byte address ptr.
template<typename T>
const T & get (const byte *ptr)
 Returns a constant reference to the T object beginning at byte address ptr.
template<typename T>
T & fetch (T &obj, const byte *ptr)
 Creates obj T as being a copy of the T object beginning at byte address ptr and returns a reference to it.
template<typename T>
T & swap (T &obj, typename boost::enable_if< boost::is_pod< T >, const byte * >::type ptr)
 Creates obj T as being a byte swapped copy of the T object beginning at byte address ptr and returns a reference to it.
template<typename T>
T & endianConvertIf (T &obj, typename boost::enable_if< boost::is_pod< T >, const byte * >::type ptr, bool convert)
 Creates obj T as being an endian converted or unconverted copy of the T object beginning at byte address ptr and returns a reference to it.
template<typename T>
T & endianConvertIf (T &obj, typename boost::enable_if< boost::is_pod< T >, const byte * >::type ptr, boost::mpl::false_)
 Creates obj T as being an unconverted copy of the T object beginning at byte address ptr and returns a reference to it.
template<typename T>
T & endianConvertIf (T &obj, typename boost::enable_if< boost::is_pod< T >, const byte * >::type ptr, boost::mpl::true_)
 Creates obj T as being an endian converted copy of the T object beginning at byte address ptr and returns a reference to it.
template<typename T>
T & networkByteOrderConvert (T &obj, typename boost::enable_if< boost::is_pod< T >, const byte * >::type ptr)
 Creates obj T as being an endian converted or unconverted copy of the T object beginning at byte address ptr and returns a reference to it.
template<typename T>
swapped (typename boost::enable_if< boost::is_pod< T >, T >::type value)
 Returns an object of type T being a byte swapped copy of the T object value.
template<typename T>
endianConvertedIf (typename boost::enable_if< boost::is_pod< T >, T >::type value, bool convert)
 Returns the endian converted or unconverted value of an object of type T.
template<typename T>
endianConvertedIf (typename boost::enable_if< boost::is_pod< T >, T >::type value, boost::mpl::false_)
 Returns the unconverted value of an object of type T.
template<typename T>
endianConvertedIf (typename boost::enable_if< boost::is_pod< T >, T >::type value, boost::mpl::true_)
 Returns the endian converted value of an object of type T.
template<typename T>
networkByteOrderConverted (typename boost::enable_if< boost::is_pod< T >, T >::type value)
 Returns the endian converted or unconverted value of an object of type T.
template<typename T>
size_t pad (typename boost::enable_if< has_pow2size< T >, size_t >::type offset)
 Returns the least number aligned to T not being less than offset.
template<typename T>
byte * put (byte *ptr, const T &value)
 Stores a T object at byte address ptr and returns the byte address of the T object following that T object.


© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).