source/ariba/utility/serialization/DataUtilities.hpp File Reference

#include "../internal/Utilities.hpp"
#include <boost/cstdint.hpp>
#include <memory>
#include <string>

Include dependency graph for DataUtilities.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename X >
static finline X shr (const X &value, unsigned int bits)
template<typename X >
static finline X shl (const X &value, unsigned int bits)
template<typename X >
static finline X bitblk (size_t index, size_t length, bool value, if_uint(X))
template<typename X , bool value>
static finline X bitblk (size_t index, size_t length, if_uint(X))
template<typename X , bool value>
static finline X bitblk (size_t length, if_uint(X))
template<typename X , typename Y >
static finline Y bitcpy (X src, size_t srcIdx, Y dst, size_t dstIdx, size_t len=sizeof(X)*8, bool srcInvert=false, bool dstInvert=false, if_uint(X), if_uint(Y))
template<typename X >
static finline void bitcpy (X *src, size_t srcIdx, X *dst, size_t dstIdx, size_t len)
template<typename X , typename Y >
static finline void bitcpy (X *src, size_t srcIdx, Y &dst, size_t dstIdx, size_t len=sizeof(Y)*8, if_uint(Y), if_uint(X))
template<typename X >
static finline void bitcpy (X src, size_t srcIdx, X *dst, size_t dstIdx, size_t len=sizeof(X)*8, bool srcInvert=false, if_uint(X))
template<typename Y , typename X >
static finline void bitcpy (Y src, size_t srcIdx, X *dst, size_t dstIdx, size_t len=sizeof(Y)*8, bool srcInvert=false, if_uint(X), if_uint(Y))
template<typename T , typename X >
static finline T bitget (X *src, size_t idx, size_t len=sizeof(T)*8, if_uint(X), if_uint(T))
template<typename T , typename X >
static finline T bitget (X src, size_t idx, size_t len=sizeof(T)*8, if_uint(X), if_uint(T))
template<typename X >
static finline bool bitget (X *src, size_t index, if_uint(X))
template<typename X >
static finline bool bitget (X src, size_t index, if_uint(X))
template<typename T , typename X >
static finline void bitset (T src, X *dst, size_t index, if_uint(X), if_uint(T))
template<typename X >
static finline void bitset (bool src, X *dst, size_t index, if_uint(X))
template<typename X >
static finline X bitset (bool src, X dst, size_t index, if_uint(X))
template<typename X >
static finline X bitrev (X src, if_uint(X))
template<typename X >
static finline void bitrev (X *src, size_t len, if_uint(X))
template<typename X >
static finline X switch_endian (X src, if_uint(X))
template<typename X >
static finline std::string bitstr (X src, int log2base=4, if_uint(X))
template<typename X >
static finline std::string bitstr (X *src, size_t len, int log2base=4, bool dot=false, if_uint(X))


Function Documentation

template<typename X , bool value>
static finline X bitblk ( size_t  length,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 105 of file DataUtilities.hpp.

template<typename X , bool value>
static finline X bitblk ( size_t  index,
size_t  length,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 97 of file DataUtilities.hpp.

template<typename X >
static finline X bitblk ( size_t  index,
size_t  length,
bool  value,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 87 of file DataUtilities.hpp.

References shl().

template<typename Y , typename X >
static finline void bitcpy ( src,
size_t  srcIdx,
X *  dst,
size_t  dstIdx,
size_t  len = sizeof(Y) * 8,
bool  srcInvert = false,
if_uint(X)  ,
if_uint(Y)   
) [inline, static]

TODO: Doc

Definition at line 280 of file DataUtilities.hpp.

References bitcpy(), and shr().

template<typename X >
static finline void bitcpy ( src,
size_t  srcIdx,
X *  dst,
size_t  dstIdx,
size_t  len = sizeof(X) * 8,
bool  srcInvert = false,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 242 of file DataUtilities.hpp.

References bitcpy(), shl(), and shr().

template<typename X , typename Y >
static finline void bitcpy ( X *  src,
size_t  srcIdx,
Y &  dst,
size_t  dstIdx,
size_t  len = sizeof(Y) * 8,
if_uint(Y)  ,
if_uint(X)   
) [inline, static]

array -> integral

Definition at line 201 of file DataUtilities.hpp.

References shl(), and shr().

template<typename X >
static finline void bitcpy ( X *  src,
size_t  srcIdx,
X *  dst,
size_t  dstIdx,
size_t  len 
) [inline, static]

This method copies bits from an array to another of the same integral type.

Definition at line 129 of file DataUtilities.hpp.

References bitcpy(), shl(), and shr().

template<typename X , typename Y >
static finline Y bitcpy ( src,
size_t  srcIdx,
dst,
size_t  dstIdx,
size_t  len = sizeof(X) * 8,
bool  srcInvert = false,
bool  dstInvert = false,
if_uint(X)  ,
if_uint(Y)   
) [inline, static]

template<typename X >
static finline bool bitget ( src,
size_t  index,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 339 of file DataUtilities.hpp.

References bitcpy().

template<typename X >
static finline bool bitget ( X *  src,
size_t  index,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 329 of file DataUtilities.hpp.

References bitcpy().

template<typename T , typename X >
static finline T bitget ( src,
size_t  idx,
size_t  len = sizeof(T) * 8,
if_uint(X)  ,
if_uint(T)   
) [inline, static]

TODO: Doc

Definition at line 319 of file DataUtilities.hpp.

References bitcpy().

template<typename T , typename X >
static finline T bitget ( X *  src,
size_t  idx,
size_t  len = sizeof(T) * 8,
if_uint(X)  ,
if_uint(T)   
) [inline, static]

TODO: Doc

Definition at line 309 of file DataUtilities.hpp.

References bitcpy().

Referenced by bitrev(), and DataTpl< T, DataModel >::DataTpl::DataManipulator::get().

template<typename X >
static finline void bitrev ( X *  src,
size_t  len,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 385 of file DataUtilities.hpp.

References bitget(), and bitset().

template<typename X >
static finline X bitrev ( src,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 373 of file DataUtilities.hpp.

References bitget(), and bitset().

template<typename X >
static finline X bitset ( bool  src,
dst,
size_t  index,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 365 of file DataUtilities.hpp.

References bitcpy().

template<typename X >
static finline void bitset ( bool  src,
X *  dst,
size_t  index,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 357 of file DataUtilities.hpp.

References bitcpy().

template<typename T , typename X >
static finline void bitset ( src,
X *  dst,
size_t  index,
if_uint(X)  ,
if_uint(T)   
) [inline, static]

TODO: Doc

Definition at line 349 of file DataUtilities.hpp.

References bitcpy().

Referenced by bitrev(), and DataTpl< T, DataModel >::DataTpl::DataManipulator::operator=().

template<typename X >
static finline std::string bitstr ( X *  src,
size_t  len,
int  log2base = 4,
bool  dot = false,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 427 of file DataUtilities.hpp.

References bitstr().

template<typename X >
static finline std::string bitstr ( src,
int  log2base = 4,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 413 of file DataUtilities.hpp.

Referenced by bitstr(), and operator<<().

template<typename X >
static finline X shl ( const X &  value,
unsigned int  bits 
) [inline, static]

Definition at line 79 of file DataUtilities.hpp.

Referenced by bitblk(), and bitcpy().

template<typename X >
static finline X shr ( const X &  value,
unsigned int  bits 
) [inline, static]

Definition at line 74 of file DataUtilities.hpp.

Referenced by bitcpy().

template<typename X >
static finline X switch_endian ( src,
if_uint(X)   
) [inline, static]

TODO: Doc

Definition at line 398 of file DataUtilities.hpp.


Generated on Fri Aug 14 23:37:34 2009 for Ariba by  doxygen 1.5.8