| Disk ARchive 2.8.4 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 | List of all members
libdar::limitint< B > Class Template Reference
API | Private

`#include <limitint.hpp>`

## Public Member Functions
| limitint (size_t a=0)
| limitint (proto_generic_file &x)
| limitint (const limitint &ref)=default
| limitint (limitint &&ref) noexcept=default
limitint & | operator= (const limitint &ref)=default
limitint & | operator= (limitint &&ref) noexcept=default
void | dump (proto_generic_file &x) const
void | read (proto_generic_file &f)
limitint & | operator+= (const limitint &ref)
limitint & | operator-= (const limitint &ref)
limitint & | operator*= (const limitint &ref)
template<class T>
limitint | power (const T &exponent) const
limitint & | operator/= (const limitint &ref)
limitint & | operator%= (const limitint &ref)
limitint & | operator&= (const limitint &ref)
limitint & | operator|= (const limitint &ref)
limitint & | operator^= (const limitint &ref)
limitint & | operator>>= (U_32 bit)
limitint & | operator>>= (limitint bit)
limitint & | operator<<= (U_32 bit)
limitint & | operator<<= (limitint bit)
limitint | operator++ (int a)
limitint | operator-- (int a)
limitint & | operator++ ()
limitint & | operator-- ()
U_32 | operator% (U_32 arg) const
template<class T>
void | unstack (T &v)
limitint | get_storage_size () const
unsigned char | operator[] (const limitint &position) const
bool | is_zero () const
bool | operator< (const limitint &x) const
bool | operator== (const limitint &x) const
bool | operator> (const limitint &x) const
bool | operator<= (const limitint &x) const
bool | operator!= (const limitint &x) const
bool | operator>= (const limitint &x) const
B | debug_get_max () const
B | debug_get_bytesize () const
B | debug_get_field () const
template<class T>
limitint< B > | power (const T &exponent) 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
void | build_from_file (proto_generic_file &x)
template<class T>
void | limitint_from (T a)
template<class T>
T | max_val_of (T x)
template<class T>
void | limitint_unstack_to (T &a)

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

## Private Attributes
B | field

## Static Private Attributes
static const int | TG = 4
static const U_32 | sizeof_field = sizeof(B)
static endian | used_endian
static const U_I | bytesize = sizeof(B)
static const B | max_value = ~B(0) > 0 ? ~B(0) : ~(B(1) << (bytesize*8 - 1))
static U_8 | zeroed_field [ZEROED_SIZE]

## Detailed Description

template<class B>
class libdar::limitint< B >

limitint template class

the limitint template class implementation can handle positive integers and detect overflow. It shares with infinint the same interface, so it can be use in place of it, but throw Elimitint exceptions if overflow is detected. this template class receive as argument a positive integer atomic type In particular it is assumed that the sizeof() operator gives the amount of byte of information that this type can handle, and it is also assumed that the bytes of information are contiguous.

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

Definition at line 87 of file limitint.hpp.

## Member Function Documentation

## ◆ power()

template<class B>
template<class T>

limitint< B > libdar::limitint< B >::power | ( | const T & | exponent | ) | const

Definition at line 452 of file limitint.hpp.

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

- limitint.hpp