omw  0.2.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
omw::Base_Int128 Class Reference
Inheritance diagram for omw::Base_Int128:
omw::SignedInt128 omw::UnsignedInt128

Public Member Functions

 Base_Int128 (const omw::Base_Int128 &other)
 
 Base_Int128 (int64_t value)
 
 Base_Int128 (uint64_t valueH, uint64_t valueL)
 
 Base_Int128 (uint32_t valueHH, uint32_t valueLH, uint32_t valueHL, uint32_t valueLL)
 
void set (uint64_t valueH, uint64_t valueL)
 
void set (uint32_t valueHH, uint32_t valueLH, uint32_t valueHL, uint32_t valueLL)
 
void sets (int64_t value)
 
void sets (int64_t valueH, uint64_t valueL)
 
void sets (int32_t valueHH, uint32_t valueLH, uint32_t valueHL, uint32_t valueLL)
 
void sets (const uint8_t *data, size_t count)
 
void setu (uint64_t value)
 
void setu (const uint8_t *data, size_t count)
 
uint64_t high () const
 
uint64_t hi () const
 
int64_t highs () const
 
int64_t his () const
 
uint64_t low () const
 
uint64_t lo () const
 
 operator bool () const
 
Operators
omw::Base_Int128operator+= (const omw::Base_Int128 &b)
 
omw::Base_Int128operator-= (const omw::Base_Int128 &b)
 
omw::Base_Int128operator&= (const omw::Base_Int128 &b)
 
omw::Base_Int128operator|= (const omw::Base_Int128 &b)
 
omw::Base_Int128operator^= (const omw::Base_Int128 &b)
 
omw::Base_Int128operator<<= (unsigned int count)
 
omw::Base_Int128operator++ ()
 
omw::Base_Int128operator-- ()
 
omw::Base_Int128 operator++ (int)
 
omw::Base_Int128 operator-- (int)
 

Protected Member Functions

void copy (const omw::Base_Int128 &other)
 

Protected Attributes

uint64_t m_h
 
uint64_t m_l
 

Constructor & Destructor Documentation

◆ Base_Int128()

omw::Base_Int128::Base_Int128 ( int64_t  value)

Uses omw::Base_Int128::sets(int64_t) to initialize.

Member Function Documentation

◆ operator bool()

omw::Base_Int128::operator bool ( ) const
inlineexplicit

If the value is 0, false is returned. true for any other value.

◆ operator<<=()

omw::Base_Int128 & omw::Base_Int128::operator<<= ( unsigned int  count)

◆ sets() [1/2]

void omw::Base_Int128::sets ( const uint8_t *  data,
size_t  count 
)
Parameters
dataPointer to a big endian byte buffer
countNumber of bytes to read

Interprets the value from a byte buffer as signed: The sign bit (MSB of data[0]) is extended.

If data or count is 0, the object remains unchanged.

Exceptions

◆ sets() [2/2]

void omw::Base_Int128::sets ( int64_t  value)

Extends the sign bit.

◆ setu() [1/2]

void omw::Base_Int128::setu ( const uint8_t *  data,
size_t  count 
)
Parameters
dataPointer to a big endian byte buffer
countNumber of bytes to read

Interprets the value from a byte buffer as unsigned.

If data or count is 0, the object remains unchanged.

Exceptions

◆ setu() [2/2]

void omw::Base_Int128::setu ( uint64_t  value)

Does not extend the sign bit.


The documentation for this class was generated from the following files: