Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cUnion64 Union Reference

#include <cTypes.h>

Public Member Functions

 operator UINT64 () const noexcept
 
void operator= (UINT64 qw) noexcept
 

Public Attributes

BYTE u_b [8]
 Map to bytes. More...
 
char u_c [8]
 
signed char u_sc [8]
 
WORD u_w [4]
 16 bit words More...
 
short u_s [4]
 16 bit words More...
 
UINT32 u_dw [2]
 HighPart=1, LowPart=0 we assume for USE_LITTLE_ENDIAN. More...
 
float u_f [2]
 2 * 32 bit floats. More...
 
double u_d
 assumed to be 64 bits. More...
 
UINT64 u_qw
 64 bits = QuadPart = ULONGLONG. More...
 
INT64 u_iq
 64 bits = QuadPart = LONGLONG. More...
 
struct {
   cUnion32   m_Hi
 
   cUnion32   m_Lo
 
u2
 

Detailed Description

What types can fit inside 16 bits? MAKEWORD(l,h) 16 bit union. size = 2 bytes This depends on USE_LITTLE_ENDIAN of course.

What types can fit inside 64 bits? 64 bit union. Assumes alignment if anyone cares. size = 8 bytes similar to WIN32 LARGE_INTEGER union. or cUInt64 2 * cUnion32 This depends on USE_LITTLE_ENDIAN of course. Warning in GNUC reinterpret warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Member Function Documentation

◆ operator UINT64()

Gray::cUnion64::operator UINT64 ( ) const
inlinenoexcept

◆ operator=()

void Gray::cUnion64::operator= ( UINT64  qw)
inlinenoexcept

Member Data Documentation

◆ m_Hi

cUnion32 Gray::cUnion64::m_Hi

◆ m_Lo

cUnion32 Gray::cUnion64::m_Lo

◆ 

struct { ... } Gray::cUnion64::u2

◆ u_b

BYTE Gray::cUnion64::u_b[8]

Map to bytes.

◆ u_c

char Gray::cUnion64::u_c[8]

◆ u_d

double Gray::cUnion64::u_d

assumed to be 64 bits.

◆ u_dw

UINT32 Gray::cUnion64::u_dw[2]

HighPart=1, LowPart=0 we assume for USE_LITTLE_ENDIAN.

◆ u_f

float Gray::cUnion64::u_f[2]

2 * 32 bit floats.

◆ u_iq

INT64 Gray::cUnion64::u_iq

64 bits = QuadPart = LONGLONG.

◆ u_qw

UINT64 Gray::cUnion64::u_qw

64 bits = QuadPart = ULONGLONG.

◆ u_s

short Gray::cUnion64::u_s[4]

16 bit words

◆ u_sc

signed char Gray::cUnion64::u_sc[8]

◆ u_w

WORD Gray::cUnion64::u_w[4]

16 bit words


The documentation for this union was generated from the following file: