NAME

ACE_U_LongLong - Unsigned long long for platforms that don't have one.

SYNOPSIS

#include <ace/Basic_Types.h>

class ACE_U_LongLong { public: ACE_U_LongLong ( const ACE_UINT32 lo = 0x0, const ACE_UINT32 hi = 0x0 ); ACE_U_LongLong (const ACE_U_LongLong &); ACE_U_LongLong &operator= (const ACE_U_LongLong &); ~ACE_U_LongLong (void); int operator== (const ACE_U_LongLong &) const; int operator!= (const ACE_U_LongLong &) const; int operator< (const ACE_U_LongLong &) const; int operator<= (const ACE_U_LongLong &) const; int operator> (const ACE_U_LongLong &) const; int operator>= (const ACE_U_LongLong &) const; ACE_U_LongLong operator+ (const ACE_U_LongLong &) const; ACE_U_LongLong operator- (const ACE_U_LongLong &) const; ACE_U_LongLong &operator*= (const ACE_UINT32); ACE_U_LongLong operator<< (const u_int) const; ACE_U_LongLong &operator<<= (const u_int); ACE_U_LongLong operator>> (const u_int) const; ACE_U_LongLong &operator>>= (const u_int); double operator/ (const double) const; ACE_U_LongLong &operator+= (const ACE_U_LongLong &); ACE_U_LongLong &operator-= (const ACE_U_LongLong &); ACE_U_LongLong &operator++ (); ACE_U_LongLong &operator-- (); ACE_U_LongLong &operator|= (const ACE_U_LongLong); ACE_U_LongLong &operator&= (const ACE_U_LongLong); ACE_UINT32 operator/ (const ACE_UINT32) const; ACE_UINT32 operator% (const ACE_UINT32) const; ACE_UINT32 operator| (const ACE_INT32) const; ACE_UINT32 operator& (const ACE_INT32) const; ACE_U_LongLong &operator*= (const ACE_INT32); ACE_UINT32 operator/ (const ACE_INT32) const; ACE_UINT32 operator/ (const u_long) const; ACE_UINT32 operator/ (const long) const; ACE_UINT32 operator/ (const u_int) const; ACE_UINT32 operator/ (const int) const; void output (FILE * = stdout) const; ACE_UINT32 hi (void) const; ACE_UINT32 lo (void) const; void hi (const ACE_UINT32 hi); void lo (const ACE_UINT32 lo); ACE_ALLOC_HOOK_DECLARE; private: ACE_UINT32 hi_; ACE_UINT32 lo_; ACE_UINT32 ul_shift ( ACE_UINT32 a, ACE_UINT32 c_in, ACE_UINT32 *c_out ); ACE_U_LongLong ull_shift ( ACE_U_LongLong a, ACE_UINT32 c_in, ACE_UINT32 *c_out ); ACE_U_LongLong ull_add ( ACE_U_LongLong a, ACE_U_LongLong b, ACE_UINT32 *carry ); ACE_U_LongLong ull_mult ( ACE_U_LongLong a, ACE_UINT32 b, ACE_UINT32 *carry ); };

DESCRIPTION

#defines the list of preprocessor macros below. The config.h file can pre-define any of these to short-cut the definitions. This is usually only necessary if the preprocessor does all of its math using integers.

Sizes of built-in types: ACE_SIZEOF_CHAR ACE_SIZEOF_WCHAR ACE_SIZEOF_SHORT ACE_SIZEOF_INT ACE_SIZEOF_LONG ACE_SIZEOF_LONG_LONG ACE_SIZEOF_VOID_P ACE_SIZEOF_FLOAT ACE_SIZEOF_DOUBLE ACE_SIZEOF_LONG_DOUBLE

Wrappers for built-in types of specific sizes: ACE_USHORT16 /* For backward compatibility. Use ACE_UINT16 instead. */ ACE_INT16 ACE_UINT16 ACE_INT32 ACE_UINT32 ACE_UINT64 (Note: ACE_INT64 is not defined, because there is no ACE_LongLong for platforms that don't have a native 8-byte integer type.)

Byte-order (endian-ness) determination: ACE_BYTE_ORDER, to either ACE_BIG_ENDIAN or ACE_LITTLE_ENDIAN

Initialization and termination methods.

ACE_U_LongLong (const ACE_UINT32 lo = 0x0, const ACE_UINT32 hi = 0x0);

ACE_U_LongLong (const ACE_U_LongLong &);

ACE_U_LongLong &operator= (const ACE_U_LongLong &);

~ACE_U_LongLong (void);

Overloaded relation operators.

int operator== (const ACE_U_LongLong &) const;

int operator!= (const ACE_U_LongLong &) const;

int operator< (const ACE_U_LongLong &) const;

int operator<= (const ACE_U_LongLong &) const;

int operator> (const ACE_U_LongLong &) const;

int operator>= (const ACE_U_LongLong &) const;

ACE_U_LongLong operator+ (const ACE_U_LongLong &) const;

ACE_U_LongLong operator- (const ACE_U_LongLong &) const;

ACE_U_LongLong &operator*= (const ACE_UINT32);

ACE_U_LongLong operator<< (const u_int) const;

ACE_U_LongLong &operator<<= (const u_int);

ACE_U_LongLong operator>> (const u_int) const;

ACE_U_LongLong &operator>>= (const u_int);

double operator/ (const double) const;

ACE_U_LongLong &operator+= (const ACE_U_LongLong &);

ACE_U_LongLong &operator-= (const ACE_U_LongLong &);

ACE_U_LongLong &operator++ ();

ACE_U_LongLong &operator-- ();

ACE_U_LongLong &operator|= (const ACE_U_LongLong);

ACE_U_LongLong &operator&= (const ACE_U_LongLong);

Note that the following take ACE_UINT32 arguments. These are typical use cases, and easy to implement. But, they limit the return values to 32 bits as well. There are no checks for overflow.

ACE_UINT32 operator/ (const ACE_UINT32) const;

ACE_UINT32 operator% (const ACE_UINT32) const;

The following only operate on the lower 32 bits (they take only 32 bit arguments).

ACE_UINT32 operator| (const ACE_INT32) const;

ACE_UINT32 operator& (const ACE_INT32) const;

The following operators convert their arguments to ACE_UINT32. So, there may be information loss if they are used.

ACE_U_LongLong &operator*= (const ACE_INT32);

ACE_UINT32 operator/ (const ACE_INT32) const;

ACE_UINT32 operator/ (const u_long) const;

ACE_UINT32 operator/ (const long) const;

ACE_UINT32 operator/ (const u_int) const;

ACE_UINT32 operator/ (const int) const;

Helper methods.

void output (FILE * = stdout) const;

ACE_UINT32 hi (void) const;

ACE_UINT32 lo (void) const;

void hi (const ACE_UINT32 hi);

void lo (const ACE_UINT32 lo);

ACE_ALLOC_HOOK_DECLARE;

AUTHORS

David L. Levine

LIBRARY

ace