omw  0.2.0
Classes | Macros | Typedefs

Classes

class  omw::Base_Int128
 
class  omw::SignedInt128
 
class  omw::UnsignedInt128
 

Macros

#define OMW_8BIT_ALL   (0xFF)
 
#define OMW_8BIT_LSB   (0x01)
 
#define OMW_8BIT_MSB   (0x80)
 
#define OMW_16BIT_ALL   (0xFFFF)
 
#define OMW_16BIT_LSB   (0x0001)
 
#define OMW_16BIT_MSB   (0x8000)
 
#define OMW_32BIT_ALL   (0xFFFFFFFF)
 
#define OMW_32BIT_LSB   (0x00000001)
 
#define OMW_32BIT_MSB   (0x80000000)
 
#define OMW_64BIT_ALL   (0xFFFFFFFFFFFFFFFF)
 
#define OMW_64BIT_LSB   (0x0000000000000001)
 
#define OMW_64BIT_MSB   (0x8000000000000000)
 
#define OMW_128BIT_ALL   (omw::Base_Int128(OMW_64BIT_ALL, OMW_64BIT_ALL))
 
#define OMW_128BIT_LSB   (omw::Base_Int128(0, OMW_64BIT_LSB))
 
#define OMW_128BIT_MSB   (omw::Base_Int128(OMW_64BIT_MSB, 0))
 
#define OMW_INT128_MIN   (omw::int128_t(OMW_64BIT_MSB, 0))
 
#define OMW_INT128_MAX   (omw::int128_t(~OMW_64BIT_MSB, OMW_64BIT_ALL))
 
#define OMW_UINT128_MAX   (omw::uint128_t(OMW_64BIT_ALL, OMW_64BIT_ALL))
 

Typedefs

using omw::int128_t = omw::SignedInt128
 
using omw::uint128_t = omw::UnsignedInt128
 

Operators

omw::SignedInt128 omw::operator+ (const omw::SignedInt128 &a)
 
omw::UnsignedInt128 omw::operator+ (const omw::UnsignedInt128 &a)
 
omw::SignedInt128 omw::operator- (const omw::SignedInt128 &a)
 
omw::UnsignedInt128 omw::operator- (const omw::UnsignedInt128 &a)
 
omw::SignedInt128 omw::operator+ (const omw::SignedInt128 &a, const omw::Base_Int128 &b)
 
omw::UnsignedInt128 omw::operator+ (const omw::UnsignedInt128 &a, const omw::Base_Int128 &b)
 
omw::SignedInt128 omw::operator- (const omw::SignedInt128 &a, const omw::Base_Int128 &b)
 
omw::UnsignedInt128 omw::operator- (const omw::UnsignedInt128 &a, const omw::Base_Int128 &b)
 
omw::SignedInt128 omw::operator~ (const omw::SignedInt128 &a)
 
omw::UnsignedInt128 omw::operator~ (const omw::UnsignedInt128 &a)
 
omw::SignedInt128 omw::operator& (const omw::SignedInt128 &a, const omw::Base_Int128 &b)
 
omw::UnsignedInt128 omw::operator& (const omw::UnsignedInt128 &a, const omw::Base_Int128 &b)
 
omw::SignedInt128 omw::operator| (const omw::SignedInt128 &a, const omw::Base_Int128 &b)
 
omw::UnsignedInt128 omw::operator| (const omw::UnsignedInt128 &a, const omw::Base_Int128 &b)
 
omw::SignedInt128 omw::operator^ (const omw::SignedInt128 &a, const omw::Base_Int128 &b)
 
omw::UnsignedInt128 omw::operator^ (const omw::UnsignedInt128 &a, const omw::Base_Int128 &b)
 
omw::SignedInt128 omw::operator<< (const omw::SignedInt128 &a, unsigned int count)
 
omw::UnsignedInt128 omw::operator<< (const omw::UnsignedInt128 &a, unsigned int count)
 
omw::SignedInt128 omw::operator>> (const omw::SignedInt128 &a, unsigned int count)
 
omw::UnsignedInt128 omw::operator>> (const omw::UnsignedInt128 &a, unsigned int count)
 
bool omw::operator== (const omw::SignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator!= (const omw::SignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator< (const omw::SignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator> (const omw::SignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator<= (const omw::SignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator>= (const omw::SignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator== (const omw::SignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator!= (const omw::SignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator< (const omw::SignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator> (const omw::SignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator<= (const omw::SignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator>= (const omw::SignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator== (const omw::UnsignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator!= (const omw::UnsignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator< (const omw::UnsignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator> (const omw::UnsignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator<= (const omw::UnsignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator>= (const omw::UnsignedInt128 &a, const omw::SignedInt128 &b)
 
bool omw::operator== (const omw::UnsignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator!= (const omw::UnsignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator< (const omw::UnsignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator> (const omw::UnsignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator<= (const omw::UnsignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator>= (const omw::UnsignedInt128 &a, const omw::UnsignedInt128 &b)
 
bool omw::operator== (const omw::Version &a, const omw::Version &b)
 
bool omw::operator!= (const omw::Version &a, const omw::Version &b)
 
bool omw::operator< (const omw::Version &a, const omw::Version &b)
 
bool omw::operator> (const omw::Version &a, const omw::Version &b)
 
bool omw::operator<= (const omw::Version &a, const omw::Version &b)
 
bool omw::operator>= (const omw::Version &a, const omw::Version &b)
 

Detailed Description

#include <omw/int.h>

Typedef Documentation

◆ int128_t

Signed 128-bit integer type (omw::SignedInt128)

◆ uint128_t

Unsigned 128-bit integer type (omw::UnsignedInt128)

Function Documentation

◆ operator!=() [1/3]

bool omw::operator!= ( const omw::SignedInt128 a,
const omw::UnsignedInt128 b 
)

◆ operator!=() [2/3]

bool omw::operator!= ( const omw::UnsignedInt128 a,
const omw::SignedInt128 b 
)

◆ operator!=() [3/3]

bool omw::operator!= ( const omw::Version a,
const omw::Version b 
)

All comparisons are using omw::Version::compare().

◆ operator+() [1/2]

omw::SignedInt128 omw::operator+ ( const omw::SignedInt128 a)

Does nothing else than returning a.

◆ operator+() [2/2]

omw::UnsignedInt128 omw::operator+ ( const omw::UnsignedInt128 a)

Does nothing else than returning a.

◆ operator-() [1/2]

omw::SignedInt128 omw::operator- ( const omw::SignedInt128 a)

Returns the two's complement of a.

◆ operator-() [2/2]

omw::UnsignedInt128 omw::operator- ( const omw::UnsignedInt128 a)

Returns the two's complement of a.

◆ operator<() [1/3]

bool omw::operator< ( const omw::SignedInt128 a,
const omw::UnsignedInt128 b 
)

◆ operator<() [2/3]

bool omw::operator< ( const omw::UnsignedInt128 a,
const omw::SignedInt128 b 
)

◆ operator<() [3/3]

bool omw::operator< ( const omw::Version a,
const omw::Version b 
)

All comparisons are using omw::Version::compare().

◆ operator<<() [1/2]

omw::SignedInt128 omw::operator<< ( const omw::SignedInt128 a,
unsigned int  count 
)

◆ operator<<() [2/2]

omw::UnsignedInt128 omw::operator<< ( const omw::UnsignedInt128 a,
unsigned int  count 
)

◆ operator<=() [1/3]

bool omw::operator<= ( const omw::SignedInt128 a,
const omw::UnsignedInt128 b 
)

◆ operator<=() [2/3]

bool omw::operator<= ( const omw::UnsignedInt128 a,
const omw::SignedInt128 b 
)

◆ operator<=() [3/3]

bool omw::operator<= ( const omw::Version a,
const omw::Version b 
)

All comparisons are using omw::Version::compare().

◆ operator==() [1/3]

bool omw::operator== ( const omw::SignedInt128 a,
const omw::UnsignedInt128 b 
)

Sign aware comparsion operator. Negative signed integers compare always less than unsigned integers. Unsigned integers grater than the maximal signed value compare always greater than signed integers. Signed and unsigned integers only compare equal if their represented value is the same.

◆ operator==() [2/3]

bool omw::operator== ( const omw::UnsignedInt128 a,
const omw::SignedInt128 b 
)

◆ operator==() [3/3]

bool omw::operator== ( const omw::Version a,
const omw::Version b 
)

All comparisons are using omw::Version::compare().

◆ operator>() [1/3]

bool omw::operator> ( const omw::SignedInt128 a,
const omw::UnsignedInt128 b 
)

◆ operator>() [2/3]

bool omw::operator> ( const omw::UnsignedInt128 a,
const omw::SignedInt128 b 
)

◆ operator>() [3/3]

bool omw::operator> ( const omw::Version a,
const omw::Version b 
)

All comparisons are using omw::Version::compare().

◆ operator>=() [1/3]

bool omw::operator>= ( const omw::SignedInt128 a,
const omw::UnsignedInt128 b 
)

◆ operator>=() [2/3]

bool omw::operator>= ( const omw::UnsignedInt128 a,
const omw::SignedInt128 b 
)

◆ operator>=() [3/3]

bool omw::operator>= ( const omw::Version a,
const omw::Version b 
)

All comparisons are using omw::Version::compare().

◆ operator>>() [1/2]

omw::SignedInt128 omw::operator>> ( const omw::SignedInt128 a,
unsigned int  count 
)

◆ operator>>() [2/2]

omw::UnsignedInt128 omw::operator>> ( const omw::UnsignedInt128 a,
unsigned int  count 
)