| Disk ARchive 2.8.3 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
libdar::infinint Class Reference
API

the arbitrary large positive integer class More...

`#include <real_infinint.hpp>`

## Public Member Functions
| infinint (size_t a=0)
| infinint (proto_generic_file &x)
| read an infinint from a file
| infinint (const infinint &ref)
| infinint (infinint &&ref) noexcept
infinint & | operator= (const infinint &ref)
infinint & | operator= (infinint &&ref) noexcept
void | dump (proto_generic_file &x) const
void | read (proto_generic_file &f)
infinint & | operator+= (const infinint &ref)
infinint & | operator-= (const infinint &ref)
infinint & | operator*= (unsigned char arg)
infinint & | operator*= (const infinint &ref)
template<class T>
infinint | power (const T &exponent) const
infinint & | operator/= (const infinint &ref)
infinint & | operator%= (const infinint &ref)
infinint & | operator&= (const infinint &ref)
infinint & | operator|= (const infinint &ref)
infinint & | operator^= (const infinint &ref)
infinint & | operator>>= (U_32 bit)
infinint & | operator>>= (infinint bit)
infinint & | operator<<= (U_32 bit)
infinint & | operator<<= (infinint bit)
infinint | operator++ (int a)
infinint | operator-- (int a)
infinint & | operator++ ()
infinint & | operator-- ()
U_32 | operator% (U_32 arg) const
template<class T>
void | unstack (T &v)
| convert infinint to standard interger types
infinint | get_storage_size () const noexcept
| it returns number of byte of information necessary to store the integer
unsigned char | operator[] (const infinint &position) const
| return in little endian order the information byte storing the integer
bool | is_zero () const
| infinint (size_t a=0)
| infinint (proto_generic_file &x)
| read an infinint from a file
| infinint (const infinint &ref)
| infinint (infinint &&ref) noexcept
infinint & | operator= (const infinint &ref)
infinint & | operator= (infinint &&ref) noexcept
void | dump (proto_generic_file &x) const
void | read (proto_generic_file &f)
infinint & | operator+= (const infinint &ref)
infinint & | operator-= (const infinint &ref)
infinint & | operator*= (unsigned char arg)
infinint & | operator*= (const infinint &ref)
template<class T>
infinint | power (const T &exponent) const
infinint & | operator/= (const infinint &ref)
infinint & | operator%= (const infinint &ref)
infinint & | operator&= (const infinint &ref)
infinint & | operator|= (const infinint &ref)
infinint & | operator^= (const infinint &ref)
infinint & | operator>>= (U_32 bit)
infinint & | operator>>= (infinint bit)
infinint & | operator<<= (U_32 bit)
infinint & | operator<<= (infinint bit)
infinint | operator++ (int a)
infinint | operator-- (int a)
infinint & | operator++ ()
infinint & | operator-- ()
U_32 | operator% (U_32 arg) const
template<class T>
void | unstack (T &v)
| convert infinint to standard interger types
infinint | get_storage_size () const noexcept
| it returns number of byte of information necessary to store the integer
unsigned char | operator[] (const infinint &position) const
| return in little endian order the information byte storing the integer
bool | is_zero () const

## Static Public Member Functions
static bool | is_system_big_endian ()
static bool | is_system_big_endian ()

## Private Types
enum | endian { big_endian , little_endian , not_initialized , big_endian , little_endian , not_initialized }
enum | endian { big_endian , little_endian , not_initialized , big_endian , little_endian , not_initialized }
using | group = unsigned char[TG]
using | group = unsigned char[TG]

## Private Member Functions
bool | is_valid () const noexcept
void | build_from_file (proto_generic_file &x)
void | reduce ()
void | copy_from (const infinint &ref)
void | move_from (infinint &&ref) noexcept
void | detruit ()
void | make_at_least_as_wider_as (const infinint &ref)
template<class T>
void | infinint_from (T a)
template<class T>
T | max_val_of (T x)
template<class T>
void | infinint_unstack_to (T &a)
template<class T>
T | modulo (T arg) const
signed int | difference (const infinint &b) const
bool | is_valid () const noexcept
void | build_from_file (proto_generic_file &x)
void | reduce ()
void | copy_from (const infinint &ref)
void | move_from (infinint &&ref) noexcept
void | detruit ()
void | make_at_least_as_wider_as (const infinint &ref)
template<class T>
void | infinint_from (T a)
template<class T>
T | max_val_of (T x)
template<class T>
void | infinint_unstack_to (T &a)
template<class T>
T | modulo (T arg) const
signed int | difference (const infinint &b) const

## Static Private Member Functions
static void | setup_endian ()
static void | setup_endian ()

## Private Attributes
storage * | field

## Static Private Attributes
static constexpr int | TG = 4
static endian | used_endian
static U_8 | zeroed_field [ZEROED_SIZE]

## Friends
bool | operator< (const infinint &, const infinint &)
bool | operator== (const infinint &, const infinint &)
bool | operator> (const infinint &, const infinint &)
bool | operator<= (const infinint &, const infinint &)
bool | operator!= (const infinint &, const infinint &)
bool | operator>= (const infinint &, const infinint &)
void | euclide (infinint a, const infinint &b, infinint &q, infinint &r)
bool | operator< (const infinint &, const infinint &)
bool | operator== (const infinint &, const infinint &)
bool | operator> (const infinint &, const infinint &)
bool | operator<= (const infinint &, const infinint &)
bool | operator!= (const infinint &, const infinint &)
bool | operator>= (const infinint &, const infinint &)
void | euclide (infinint a, const infinint &b, infinint &q, infinint &r)

## Detailed Description

the arbitrary large positive integer class

can only handle positive integer numbers

Note
  if you just want to convert an infinint integer to its decimal representation see the class libdar::deci

Definition at line 61 of file dar64-2.8.3-win64/include/dar/real_infinint.hpp.

## Constructor & Destructor Documentation

## ◆ infinint() [1/3]

libdar::infinint::infinint | ( | size_t | a = 0 | ) |
| inline

Definition at line 75 of file src/libdar/real_infinint.hpp.

## ◆ infinint() [2/3]

libdar::infinint::infinint | ( | const infinint & | ref | ) |
| inline

Definition at line 81 of file src/libdar/real_infinint.hpp.

## ◆ infinint() [3/3]

libdar::infinint::infinint | ( | infinint && | ref | ) |
| inline noexcept

Definition at line 82 of file src/libdar/real_infinint.hpp.

## ◆ ~infinint()

libdar::infinint::~infinint | ( |  | ) |
| inline

Definition at line 87 of file src/libdar/real_infinint.hpp.

## Member Function Documentation

## ◆ get_storage_size()

infinint libdar::infinint::get_storage_size | ( |  | ) | const
| inline noexcept

it returns number of byte of information necessary to store the integer

Definition at line 128 of file src/libdar/real_infinint.hpp.

## ◆ is_zero()

bool libdar::infinint::is_zero | ( |  | ) | const

Returns
  true when the object is zero (more efficient than integer comparison)

## ◆ move_from()

void libdar::infinint::move_from | ( | infinint && | ref | ) |
| inline private noexcept

Definition at line 158 of file src/libdar/real_infinint.hpp.

## ◆ operator%()

U_32 libdar::infinint::operator% | ( | U_32 | arg | ) | const
| inline

Definition at line 115 of file src/libdar/real_infinint.hpp.

## ◆ operator++() [1/2]

infinint & libdar::infinint::operator++ | ( |  | ) |
| inline

Definition at line 110 of file src/libdar/real_infinint.hpp.

## ◆ operator++() [2/2]

infinint libdar::infinint::operator++ | ( | int | a | ) |
| inline

Definition at line 106 of file src/libdar/real_infinint.hpp.

## ◆ operator--() [1/2]

infinint & libdar::infinint::operator-- | ( |  | ) |
| inline

Definition at line 112 of file src/libdar/real_infinint.hpp.

## ◆ operator--() [2/2]

infinint libdar::infinint::operator-- | ( | int | a | ) |
| inline

Definition at line 108 of file src/libdar/real_infinint.hpp.

## ◆ operator=() [1/2]

infinint & libdar::infinint::operator= | ( | const infinint & | ref | ) |
| inline

Definition at line 84 of file src/libdar/real_infinint.hpp.

## ◆ operator=() [2/2]

infinint & libdar::infinint::operator= | ( | infinint && | ref | ) |
| inline noexcept

Definition at line 85 of file src/libdar/real_infinint.hpp.

## ◆ read()

void libdar::infinint::read | ( | proto_generic_file & | f | ) |
| inline

Definition at line 90 of file src/libdar/real_infinint.hpp.

## ◆ unstack()

template<class T>

void libdar::infinint::unstack | ( | T & | v | ) |
| inline

convert infinint to standard interger types

Note
  increment the argument up to a legal value for its storage type and decrement the object in consequence note that the initial value of the argument is not ignored! when the object is null the value of the argument is unchanged

Definition at line 124 of file src/libdar/real_infinint.hpp.

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

- dar64-2.8.3-win64/include/dar/real_infinint.hpp
- src/libdar/real_infinint.hpp