#include <ulonglong.hh>
|
typedef unsigned int | uint |
|
Definition at line 11 of file ulonglong.hh.
◆ uint
◆ ulonglong() [1/5]
◆ ulonglong() [2/5]
ulonglong::ulonglong |
( |
const uint |
u1_, |
|
|
const uint |
u2_ |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
u1_ | most significant value |
u2_ | least significant value |
Definition at line 33 of file ulonglong.hh.
◆ ulonglong() [3/5]
ulonglong::ulonglong |
( |
const int |
u2_ | ) |
|
|
inline |
Constructor.
- Parameters
-
u2_ | least significant value |
Definition at line 42 of file ulonglong.hh.
◆ ulonglong() [4/5]
ulonglong::ulonglong |
( |
const uint |
u2_ | ) |
|
|
inline |
Constructor.
- Parameters
-
u2_ | least significant value |
Definition at line 51 of file ulonglong.hh.
◆ ulonglong() [5/5]
ulonglong::ulonglong |
( |
const double |
d | ) |
|
|
inline |
◆ operator=() [1/3]
ulonglong& ulonglong::operator= |
( |
const int |
i | ) |
|
|
inline |
◆ operator=() [2/3]
◆ operator=() [3/3]
ulonglong& ulonglong::operator= |
( |
const double |
d | ) |
|
|
inline |
Assignment operator.
Definition at line 90 of file ulonglong.hh.
92 if (d < (
double) std::numeric_limits<uint>::max()) {
96 u1 = (
uint) (d / ((
double) std::numeric_limits<uint>::max()));
97 u2 = (
uint) (d - ((
double)
u1) * (
double) std::numeric_limits<uint>::max());
◆ operator double()
ulonglong::operator double |
( |
| ) |
const |
|
inline |
cast operator
Definition at line 105 of file ulonglong.hh.
107 return ((
double)
u1) * ((double) std::numeric_limits<uint>::max()) + ((
double)
u2);
◆ operator--() [1/2]
prefix decrement
Definition at line 113 of file ulonglong.hh.
119 u2 = std::numeric_limits<uint>::max();
◆ operator++() [1/2]
prefix increment
Definition at line 127 of file ulonglong.hh.
129 if (
u2 < std::numeric_limits<uint>::max())
◆ operator--() [2/2]
postfix decrement
Definition at line 141 of file ulonglong.hh.
148 u2 = std::numeric_limits<uint>::max();
◆ operator++() [2/2]
postfix increment
Definition at line 156 of file ulonglong.hh.
159 if (
u2 < std::numeric_limits<uint>::max())
◆ operator-() [1/2]
ulonglong ulonglong::operator- |
( |
const int |
x | ) |
|
|
inline |
◆ operator+() [1/2]
ulonglong ulonglong::operator+ |
( |
const int |
x | ) |
|
|
inline |
◆ operator-() [2/2]
◆ operator+() [2/2]
◆ operator+=() [1/3]
ulonglong& ulonglong::operator+= |
( |
const int |
x | ) |
|
|
inline |
◆ operator-=() [1/3]
ulonglong& ulonglong::operator-= |
( |
const int |
x | ) |
|
|
inline |
◆ operator+=() [2/3]
◆ operator-=() [2/3]
Definition at line 226 of file ulonglong.hh.
232 u2 = (std::numeric_limits<uint>::max() -
x) +
u2 + 1;
◆ operator-=() [3/3]
◆ operator+=() [3/3]
◆ operator&=()
◆ operator|=()
◆ operator^=()
◆ operator==()
bool ulonglong::operator== |
( |
const ulonglong & |
b | ) |
const |
|
inline |
◆ operator!=()
bool ulonglong::operator!= |
( |
const ulonglong & |
b | ) |
const |
|
inline |
◆ operator<()
bool ulonglong::operator< |
( |
const ulonglong & |
b | ) |
const |
|
inline |
◆ operator<=()
bool ulonglong::operator<= |
( |
const ulonglong & |
b | ) |
const |
|
inline |
◆ operator>()
bool ulonglong::operator> |
( |
const ulonglong & |
b | ) |
const |
|
inline |
◆ operator>=()
bool ulonglong::operator>= |
( |
const ulonglong & |
b | ) |
const |
|
inline |
◆ operator[]()
uint ulonglong::operator[] |
( |
const int |
i | ) |
|
|
inline |
◆ msw()
uint ulonglong::msw |
( |
| ) |
const |
|
inline |
◆ lsw()
uint ulonglong::lsw |
( |
| ) |
const |
|
inline |
◆ write()
std::ostream& ulonglong::write |
( |
std::ostream & |
out | ) |
const |
|
inline |
Definition at line 324 of file ulonglong.hh.
326 std::ios::fmtflags oldFlags = out.flags();
327 out << std::hex << std::setfill(
'0') << std::setw(8) <<
u1 << std::setw(8) <<
u2;
◆ read()
std::istream& ulonglong::read |
( |
std::istream & |
in | ) |
|
|
inline |
◆ distance()
distance between 2 values
- Parameters
-
a | first value |
b | second value |
- Returns
- distance
Definition at line 344 of file ulonglong.hh.
348 value.
u1 = std::max(
a.u1,b.
u1) - std::min(
a.u1,b.
u1);
349 value.
u2 = std::max(
a.u2,b.
u2) - std::min(
a.u2,b.
u2);
351 if ((
a.u1 < b.
u1 &&
a.u2 > b.
u2) ||
352 (
a.u1 > b.
u1 &&
a.u2 < b.
u2)) {
354 value.
u2 = std::numeric_limits<uint>::max() - value.
u2 + 1;
◆ u1
◆ u2
The documentation for this class was generated from the following file: