---
name: "ACE_U_LongLong"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_U_LongLong"
---

# ACE\_U\_LongLong(3)

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

## 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_UINT32) const;
    int operator!= (const ACE_U_LongLong &) const;
    int operator!= (const ACE_UINT32) const;
    int operator< (const ACE_U_LongLong &) const;
    int operator< (const ACE_UINT32) const;
    int operator<= (const ACE_U_LongLong &) const;
    int operator<= (const ACE_UINT32) const;
    int operator> (const ACE_U_LongLong &) const;
    int operator> (const ACE_UINT32) const;
    int operator>= (const ACE_U_LongLong &) const;
    int operator>= (const ACE_UINT32) const;
    ACE_U_LongLong operator+ (const ACE_U_LongLong &) const;
    ACE_U_LongLong operator+ (const ACE_UINT32) const;
    ACE_U_LongLong operator- (const ACE_U_LongLong &) const;
    ACE_U_LongLong operator- (const ACE_UINT32) const;
    ACE_U_LongLong operator* (const ACE_UINT32);
    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_UINT32);
    ACE_U_LongLong &operator-= (const ACE_U_LongLong &);
    ACE_U_LongLong &operator-= (const ACE_UINT32);
    ACE_U_LongLong &operator++ ();
    ACE_U_LongLong &operator-- ();
    ACE_U_LongLong &operator|= (const ACE_U_LongLong);
    ACE_U_LongLong &operator|= (const ACE_UINT32);
    ACE_U_LongLong &operator&= (const ACE_U_LongLong);
    ACE_U_LongLong &operator&= (const ACE_UINT32);
    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_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:
    inline union;
    inline ACE_UINT32 &h_ ();
    inline const ACE_UINT32 &l_ () const;
    inline ACE_UINT32 &l_ ();
    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_UINT32) const;
```

```
int operator!= (const ACE_U_LongLong &) const;
```

```
int operator!= (const ACE_UINT32) const;
```

```
int operator< (const ACE_U_LongLong &) const;
```

```
int operator< (const ACE_UINT32) const;
```

```
int operator<= (const ACE_U_LongLong &) const;
```

```
int operator<= (const ACE_UINT32) const;
```

```
int operator> (const ACE_U_LongLong &) const;
```

```
int operator> (const ACE_UINT32) const;
```

```
int operator>= (const ACE_U_LongLong &) const;
```

```
int operator>= (const ACE_UINT32) const;
```

```
ACE_U_LongLong operator+ (const ACE_U_LongLong &) const;
```

```
ACE_U_LongLong operator+ (const ACE_UINT32) const;
```

```
ACE_U_LongLong operator- (const ACE_U_LongLong &) const;
```

```
ACE_U_LongLong operator- (const ACE_UINT32) const;
```

```
ACE_U_LongLong operator* (const ACE_UINT32);
```

```
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_UINT32);
```

```
ACE_U_LongLong &operator-= (const ACE_U_LongLong &);
```

```
ACE_U_LongLong &operator-= (const ACE_UINT32);
```

```
ACE_U_LongLong &operator++ ();
```

```
ACE_U_LongLong &operator-- ();
```

```
ACE_U_LongLong &operator|= (const ACE_U_LongLong);
```

```
ACE_U_LongLong &operator|= (const ACE_UINT32);
```

```
ACE_U_LongLong &operator&= (const ACE_U_LongLong);
```

```
ACE_U_LongLong &operator&= (const ACE_UINT32);
```

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_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;
```

Outputs the value to the FILE, in hex.

```
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
