source/ariba/utility/vtypes/detail/helper.hpp File Reference

#include <boost/cstdint.hpp>
#include <boost/type_traits.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/mpl/if.hpp>

Include dependency graph for helper.hpp:

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

Go to the source code of this file.

Defines

#define finline   inline __attribute__((always_inline))
#define if_is_base_of(X, Y)   typename boost::enable_if<boost::is_base_of<X, Y> , int>::type __v = 0
#define if_integral(X)   typename boost::enable_if<boost::is_integral<X>,int>::type __i##X = 0
#define if_uint(X)
#define if_int(X)
#define CONVERT_SIGN(X, Y)
#define CONVERT_TO_TYPE(__method, __type)

Functions

 CONVERT_SIGN (uint8_t, int8_t)
 CONVERT_SIGN (uint16_t, int16_t)
 CONVERT_SIGN (uint32_t, int32_t)


Define Documentation

#define CONVERT_SIGN ( X,
 ) 

Value:

finline X& _unsigned( Y& v ) { return *((X*)&v); } \
        finline X& _unsigned( X& v ) { return v; } \
        finline Y& _signed( X& v ) { return *((Y*)&v); } \
        finline Y& _signed( Y& v ) { return v; }

Definition at line 65 of file helper.hpp.

#define CONVERT_TO_TYPE ( __method,
__type   ) 

Value:

template<class T> __type& __method(T& x, typename \
        boost::enable_if< boost::mpl::bool_<sizeof(T) == sizeof(__type)>, int> \
        ::type __ix = 0) { return (__type&) *(&x);}

Definition at line 76 of file helper.hpp.

#define finline   inline __attribute__((always_inline))

Definition at line 43 of file helper.hpp.

#define if_int (  ) 

Value:

typename boost::enable_if<boost::is_integral<X>,int>::type __i##X = 0,\
        typename boost::enable_if<boost::is_signed<X>,int>::type __s##X = 0

Definition at line 60 of file helper.hpp.

#define if_integral (  )     typename boost::enable_if<boost::is_integral<X>,int>::type __i##X = 0

Definition at line 51 of file helper.hpp.

#define if_is_base_of ( X,
 )     typename boost::enable_if<boost::is_base_of<X, Y> , int>::type __v = 0

Definition at line 47 of file helper.hpp.

#define if_uint (  ) 

Value:

typename boost::enable_if<boost::is_integral<X>,int>::type __i##X = 0,\
        typename boost::enable_if<boost::is_unsigned<X>,int>::type __u##X = 0

Definition at line 55 of file helper.hpp.


Function Documentation

CONVERT_SIGN ( uint32_t  ,
int32_t   
)

CONVERT_SIGN ( uint16_t  ,
int16_t   
)

CONVERT_SIGN ( uint8_t  ,
int8_t   
)


Generated on Wed May 27 18:23:38 2009 for Ariba by  doxygen 1.5.6