semf
|
Class for representing big-endian numbers. More...
#include <bigendianinteger.h>
Public Member Functions | |
constexpr | BigEndianInteger (T value) |
Constructor. More... | |
virtual | ~BigEndianInteger ()=default |
T | native () const |
Returns a native representation of the stored number. More... | |
bool | operator!= (BigEndianInteger< T > other) const |
Check if this and other are unequal. More... | |
BigEndianInteger< T > & | operator%= (T i) |
Calculates the modulo. More... | |
BigEndianInteger< T > & | operator&= (T i) |
Performs a bitwise AND. More... | |
BigEndianInteger< T > & | operator*= (T i) |
Performs a multiplication. More... | |
BigEndianInteger< T > & | operator++ () |
Increments this (prefix) and returns a reference to this . More... | |
BigEndianInteger< T > & | operator++ (int i) |
Increments this (postfix) and returns a reference to this . More... | |
BigEndianInteger< T > & | operator+= (T i) |
Performs an addition. More... | |
BigEndianInteger< T > & | operator-- () |
Decrements this (prefix) and returns a reference to this . More... | |
BigEndianInteger< T > & | operator-- (int i) |
Decrements this (postfix) and returns a reference to this . More... | |
BigEndianInteger< T > & | operator-= (T i) |
Performs a subtraction. More... | |
BigEndianInteger< T > & | operator/= (T i) |
Performs a division. More... | |
BigEndianInteger< T > & | operator<<= (T i) |
Shift i bits left. More... | |
BigEndianInteger< T > & | operator= (T i) |
Assigns this with the value i . More... | |
BigEndianInteger< T > & | operator^= (T i) |
Performs a bitwise XOR. More... | |
bool | operator== (BigEndianInteger< T > other) const |
Checks for equality between this and other . More... | |
BigEndianInteger< T > & | operator>>= (T i) |
Shift i bits right. More... | |
BigEndianInteger< T > & | operator|= (T i) |
Performs a bitwise OR. More... | |
Static Public Member Functions | |
static BigEndianInteger< T > | max () |
Returns the maximum (finite) value representable by the numeric type T. More... | |
static BigEndianInteger< T > | min () |
Returns the minimum (finite) value representable by the numeric type T. More... | |
Class for representing big-endian numbers.
T | Native type of the number. |
Definition at line 33 of file bigendianinteger.h.
|
constexpr |
Constructor.
value | Value of the number. |
Definition at line 172 of file bigendianinteger.h.
|
virtualdefault |
|
static |
Returns the maximum (finite) value representable by the numeric type T.
Definition at line 178 of file bigendianinteger.h.
|
static |
Returns the minimum (finite) value representable by the numeric type T.
Definition at line 185 of file bigendianinteger.h.
T semf::BigEndianInteger< T >::native |
Returns a native representation of the stored number.
Definition at line 192 of file bigendianinteger.h.
bool semf::BigEndianInteger< T >::operator!= | ( | BigEndianInteger< T > | other | ) | const |
Check if this
and other
are unequal.
other | Other number. |
true
if unequal. Definition at line 203 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator%= | ( | T | i | ) |
Calculates the modulo.
i | Divisor. |
this
. Definition at line 209 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator&= | ( | T | i | ) |
Performs a bitwise AND.
i | Other number. |
this
. Definition at line 228 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator*= | ( | T | i | ) |
Performs a multiplication.
i | Other number. |
this
. Definition at line 237 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator++ |
Increments this
(prefix) and returns a reference to this
.
this
. Definition at line 246 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator++ | ( | int | i | ) |
Increments this
(postfix) and returns a reference to this
.
i | Number 1. |
this
. Definition at line 255 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator+= | ( | T | i | ) |
Performs an addition.
i | Other number. |
this
. Definition at line 262 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator-- |
Decrements this
(prefix) and returns a reference to this
.
this
. Definition at line 271 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator-- | ( | int | i | ) |
Decrements this
(postfix) and returns a reference to this
.
i | Number 1. |
this
. Definition at line 280 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator-= | ( | T | i | ) |
Performs a subtraction.
i | Subtrahend. |
this
. Definition at line 287 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator/= | ( | T | i | ) |
Performs a division.
i | Divisor. |
this
. Definition at line 296 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator<<= | ( | T | i | ) |
Shift i
bits left.
i | Bits to shift. |
this
. Definition at line 296 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator= | ( | T | i | ) |
Assigns this
with the value i
.
i | Value to assign. |
Definition at line 314 of file bigendianinteger.h.
bool semf::BigEndianInteger< T >::operator== | ( | BigEndianInteger< T > | other | ) | const |
Checks for equality between this
and other
.
other | Number to compare to. |
true
if equal. Definition at line 321 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator>>= | ( | T | i | ) |
Shift i
bits right.
i | Bits to shift. |
this
. Definition at line 327 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator^= | ( | T | i | ) |
Performs a bitwise XOR.
i | Other number. |
this
. Definition at line 336 of file bigendianinteger.h.
BigEndianInteger< T > & semf::BigEndianInteger< T >::operator|= | ( | T | i | ) |
Performs a bitwise OR.
i | Other number. |
this
. Definition at line 345 of file bigendianinteger.h.