mini-llvm 0.1.0
Loading...
Searching...
No Matches
mini_llvm::BigInteger Class Reference

#include <BigInteger.h>

Public Member Functions

 BigInteger () noexcept
 BigInteger (int64_t value)
 BigInteger (std::string_view str, int base=10)
 BigInteger (const BigInteger &other)=default
BigIntegeroperator= (const BigInteger &other)=default
 BigInteger (BigInteger &&other) noexcept=default
BigIntegeroperator= (BigInteger &&other) noexcept=default
BigInteger operator+ () const &
BigInteger operator+ () &&
BigInteger operator- () const &
BigInteger operator- () &&
BigIntegeroperator+= (const BigInteger &lhs)
BigIntegeroperator-= (const BigInteger &lhs)
BigIntegeroperator*= (const BigInteger &lhs)
BigIntegeroperator/= (int32_t lhs)
BigIntegeroperator++ ()
BigInteger operator++ (int)
BigIntegeroperator-- ()
BigInteger operator-- (int)
int64_t toInt64 () const noexcept
std::string toString (int base=10) const
size_t hashCode () const noexcept

Static Public Member Functions

static std::optional< BigIntegerparse (std::string_view str, int base=10)

Friends

MINI_LLVM_EXPORT bool operator== (const BigInteger &lhs, const BigInteger &rhs)
MINI_LLVM_EXPORT std::strong_ordering operator<=> (const BigInteger &lhs, const BigInteger &rhs)
MINI_LLVM_EXPORT BigInteger operator+ (const BigInteger &lhs, const BigInteger &rhs)
MINI_LLVM_EXPORT BigInteger operator- (const BigInteger &lhs, const BigInteger &rhs)
MINI_LLVM_EXPORT BigInteger operator* (const BigInteger &lhs, const BigInteger &rhs)
MINI_LLVM_EXPORT BigInteger operator/ (const BigInteger &lhs, int32_t rhs)
MINI_LLVM_EXPORT int32_t operator% (const BigInteger &lhs, int32_t rhs)
MINI_LLVM_EXPORT BigInteger abs (const BigInteger &value)
MINI_LLVM_EXPORT BigInteger abs (BigInteger &&value)
MINI_LLVM_EXPORT std::pair< BigInteger, int32_t > divRem (const BigInteger &lhs, int32_t rhs)

Constructor & Destructor Documentation

◆ BigInteger() [1/5]

mini_llvm::BigInteger::BigInteger ( )
noexcept

◆ BigInteger() [2/5]

mini_llvm::BigInteger::BigInteger ( int64_t value)

◆ BigInteger() [3/5]

mini_llvm::BigInteger::BigInteger ( std::string_view str,
int base = 10 )
explicit

◆ BigInteger() [4/5]

mini_llvm::BigInteger::BigInteger ( const BigInteger & other)
default

◆ BigInteger() [5/5]

mini_llvm::BigInteger::BigInteger ( BigInteger && other)
defaultnoexcept

Member Function Documentation

◆ hashCode()

size_t mini_llvm::BigInteger::hashCode ( ) const
noexcept

◆ operator*=()

BigInteger & mini_llvm::BigInteger::operator*= ( const BigInteger & lhs)

◆ operator+() [1/2]

BigInteger mini_llvm::BigInteger::operator+ ( ) &&

◆ operator+() [2/2]

BigInteger mini_llvm::BigInteger::operator+ ( ) const &

◆ operator++() [1/2]

BigInteger & mini_llvm::BigInteger::operator++ ( )

◆ operator++() [2/2]

BigInteger mini_llvm::BigInteger::operator++ ( int )

◆ operator+=()

BigInteger & mini_llvm::BigInteger::operator+= ( const BigInteger & lhs)

◆ operator-() [1/2]

BigInteger mini_llvm::BigInteger::operator- ( ) &&

◆ operator-() [2/2]

BigInteger mini_llvm::BigInteger::operator- ( ) const &

◆ operator--() [1/2]

BigInteger & mini_llvm::BigInteger::operator-- ( )

◆ operator--() [2/2]

BigInteger mini_llvm::BigInteger::operator-- ( int )

◆ operator-=()

BigInteger & mini_llvm::BigInteger::operator-= ( const BigInteger & lhs)

◆ operator/=()

BigInteger & mini_llvm::BigInteger::operator/= ( int32_t lhs)

◆ operator=() [1/2]

BigInteger & mini_llvm::BigInteger::operator= ( BigInteger && other)
defaultnoexcept

◆ operator=() [2/2]

BigInteger & mini_llvm::BigInteger::operator= ( const BigInteger & other)
default

◆ parse()

std::optional< BigInteger > mini_llvm::BigInteger::parse ( std::string_view str,
int base = 10 )
static

◆ toInt64()

int64_t mini_llvm::BigInteger::toInt64 ( ) const
noexcept

◆ toString()

std::string mini_llvm::BigInteger::toString ( int base = 10) const

◆ abs [1/2]

MINI_LLVM_EXPORT BigInteger abs ( BigInteger && value)
friend

◆ abs [2/2]

MINI_LLVM_EXPORT BigInteger abs ( const BigInteger & value)
friend

◆ divRem

MINI_LLVM_EXPORT std::pair< BigInteger, int32_t > divRem ( const BigInteger & lhs,
int32_t rhs )
friend

◆ operator%

MINI_LLVM_EXPORT int32_t operator% ( const BigInteger & lhs,
int32_t rhs )
friend

◆ operator*

MINI_LLVM_EXPORT BigInteger operator* ( const BigInteger & lhs,
const BigInteger & rhs )
friend

◆ operator+

MINI_LLVM_EXPORT BigInteger operator+ ( const BigInteger & lhs,
const BigInteger & rhs )
friend

◆ operator-

MINI_LLVM_EXPORT BigInteger operator- ( const BigInteger & lhs,
const BigInteger & rhs )
friend

◆ operator/

MINI_LLVM_EXPORT BigInteger operator/ ( const BigInteger & lhs,
int32_t rhs )
friend

◆ operator<=>

MINI_LLVM_EXPORT std::strong_ordering operator<=> ( const BigInteger & lhs,
const BigInteger & rhs )
friend

◆ operator==

MINI_LLVM_EXPORT bool operator== ( const BigInteger & lhs,
const BigInteger & rhs )
friend

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