Disk ARchive  2.7.15
Full featured and portable backup and archiving tool
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

the arbitrary large positive integer class More...

#include <real_infinint.hpp>

+ Collaboration diagram for libdar::infinint:

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
 
infinintoperator= (const infinint &ref)
 
infinintoperator= (infinint &&ref) noexcept
 
void dump (proto_generic_file &x) const
 
void read (proto_generic_file &f)
 
infinintoperator+= (const infinint &ref)
 
infinintoperator-= (const infinint &ref)
 
infinintoperator*= (unsigned char arg)
 
infinintoperator*= (const infinint &ref)
 
template<class T >
infinint power (const T &exponent) const
 
infinintoperator/= (const infinint &ref)
 
infinintoperator%= (const infinint &ref)
 
infinintoperator&= (const infinint &ref)
 
infinintoperator|= (const infinint &ref)
 
infinintoperator^= (const infinint &ref)
 
infinintoperator>>= (U_32 bit)
 
infinintoperator>>= (infinint bit)
 
infinintoperator<<= (U_32 bit)
 
infinintoperator<<= (infinint bit)
 
infinint operator++ (int a)
 
infinint operator-- (int a)
 
infinintoperator++ ()
 
infinintoperator-- ()
 
U_32 operator% (U_32 arg) const
 
template<class T >
void unstack (T &v)
 convert infinint to standard interger types More...
 
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 ()
 

Private Types

enum  endian { big_endian , little_endian , not_initialized }
 
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 >
max_val_of (T x)
 
template<class T >
void infinint_unstack_to (T &a)
 
template<class T >
modulo (T arg) const
 
signed int difference (const infinint &b) const
 

Static Private Member Functions

static void setup_endian ()
 

Private Attributes

storagefield
 

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)
 

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 real_infinint.hpp.


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