#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 | 
 
Constructor. 
- Parameters
- 
  
  
Definition at line 60 of file ulonglong.hh.
   60                            :
   63  {
   64    *this = d;
   65  }
 
 
◆ operator=() [1/3]
  
  | 
        
          | ulonglong & ulonglong::operator= | ( | const int | i | ) |  |  | inline | 
 
Assignment operator. 
Definition at line 70 of file ulonglong.hh.
   71  { 
   74    return *this;
   75  }
 
 
◆ operator=() [2/3]
Assignment operator. 
Definition at line 80 of file ulonglong.hh.
   81  { 
   84    return *this;
   85  }
 
 
◆ operator=() [3/3]
  
  | 
        
          | ulonglong & ulonglong::operator= | ( | const double | d | ) |  |  | inline | 
 
Assignment operator. 
Definition at line 90 of file ulonglong.hh.
   91  { 
   92    if (d < (double) std::numeric_limits<uint>::max()) {
   95    } else {
   96      u1 = (
uint) (d / ((
double) std::numeric_limits<uint>::max()));
 
   97      u2 = (
uint) (d - ((
double) 
u1) * (
double) std::numeric_limits<uint>::max());
 
   98    }
   99    return *this;
  100  }
 
 
◆ operator double()
  
  | 
        
          | ulonglong::operator double | ( |  | ) | const |  | inline | 
 
cast operator 
Definition at line 105 of file ulonglong.hh.
  106  { 
  107    return ((
double) 
u1) * ((double) std::numeric_limits<uint>::max()) + ((
double) 
u2);
 
  108  }
 
 
◆ operator--() [1/2]
prefix decrement 
Definition at line 113 of file ulonglong.hh.
  114  { 
  117    else {
  119      u2 = std::numeric_limits<uint>::max();
 
  120    }
  121    return *this;
  122  }
 
 
◆ operator++() [1/2]
prefix increment 
Definition at line 127 of file ulonglong.hh.
  128  { 
  129    if (
u2 < std::numeric_limits<uint>::max())
 
  131    else {
  134    }
  135    return *this;
  136  }
 
 
◆ operator--() [2/2]
postfix decrement 
Definition at line 141 of file ulonglong.hh.
  142  { 
  146    else {
  148      u2 = std::numeric_limits<uint>::max();
 
  149    }
  151  }
 
 
◆ operator++() [2/2]
postfix increment 
Definition at line 156 of file ulonglong.hh.
  157  { 
  159    if (
u2 < std::numeric_limits<uint>::max())
 
  161    else {
  164    }
  166  }
 
 
◆ 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 | 
 
Definition at line 196 of file ulonglong.hh.
  197  { 
  198    if (x >= 0)
  199      return (*
this += (
uint)  x);
 
  200    else
  201      return (*
this -= (
uint) -x);
 
  202  }
 
 
◆ operator-=() [1/3]
  
  | 
        
          | ulonglong & ulonglong::operator-= | ( | const int | x | ) |  |  | inline | 
 
Definition at line 204 of file ulonglong.hh.
  205  { 
  206    if (x >= 0)
  207      return (*
this -= (
uint)  x);
 
  208    else
  209      return (*
this += (
uint) -x);
 
  210  }
 
 
◆ operator+=() [2/3]
Definition at line 212 of file ulonglong.hh.
  213  { 
  214    uint l = std::numeric_limits<uint>::max() - 
u2;
 
  215 
  216    if (l >= x)
  218    else {
  221    }
  222 
  223    return *this;
  224  }
 
 
◆ operator-=() [2/3]
Definition at line 226 of file ulonglong.hh.
  227  { 
  230    else {
  232      u2 = (std::numeric_limits<uint>::max() - 
x) + 
u2 + 1;
 
  233    }
  234    return *this;
  235  }
 
 
◆ 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 | 
 
Definition at line 313 of file ulonglong.hh.
  313                               {
  314    assert(i == 0 || i == 1);
  315    if (i == 0)
  317    else
  319  }
 
 
◆ 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.
  325  {
  326    std::ios::fmtflags oldFlags = out.flags();
  327    out << std::hex << std::setfill(
'0') << std::setw(8) << 
u1 << std::setw(8) << 
u2;
 
  328    out.flags(oldFlags);
  329    return out;
  330  }
 
 
◆ 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.
  345  {
  347 
  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);
 
  350 
  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;
 
  355    }
  356 
  357    return value;
  358  }
 
 
◆ u1
◆ u2
The documentation for this class was generated from the following file: