17 #if !defined(__LITTLE_ENDIAN)
18 # define __LITTLE_ENDIAN 1234
20 #if !defined(__BIG_ENDIAN)
21 # define __BIG_ENDIAN 4321
23 #if !defined(__PDP_ENDIAN)
24 # define __PDP_ENDIAN 3412
40 template<
typename T>
static long align(
const T &)
51 template<
typename T>
static int align()
55 struct {
char c; T test; } probe;
56 done = ((
char*)&probe.test)-&probe.c;
67 template <
typename C,
typename T>
static int padding(
const T&offset)
69 long offchar = (long)&offset;
70 long alg = align<C>();
71 return int((alg + ((offchar - 1) & ~(alg - 1))) - offchar);
80 template <
typename T,
typename C>
static int padding(
const T&offset,
const C&)
82 return padding<C,T>(offset);
Bool_t isBigEndian()
Returns true/false if endianess is/ins't Big.
StArchInfo()
Constructor, initialize variables.
static int padding(const T &offset, const C &)
This is an overloaded member function, provided for convenience.
static long align(const T &)
Returns the number of bytes the type T has to be align to.
static int align()
This is an overloaded member function, provided for convenience.
static int padding(const T &offset)
Returns the number of bytes to be added to the offset of the T type to get the C type proper aligned...
Bool_t isLittleEndian()
Returns true/false if endianess is/ins't Little.
~StArchInfo()
Destructore - NOOP.