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

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

stores a range of integers or a set of ranges More...

`#include <range.hpp>`

## Public Member Functions
| range (const infinint &low, const infinint &high)
| range (const range &ref)=default
| range (range &&ref) noexcept=default
range & | operator= (const range &ref)=default
range & | operator= (range &&ref) noexcept=default
void | operator+= (const range &ref)
range | operator+ (const range &ref) const
std::string | display () const
void | reset_read () const
| provides a way to read range contents segment by segment
bool | read_next_segment (infinint &low, infinint &high) const
| read the next available segment
void | clear ()

## Private Attributes
std::list< segment > | parts
std::list< segment >::const_iterator | read_cursor

## Detailed Description

stores a range of integers or a set of ranges

Definition at line 43 of file range.hpp.

## Constructor & Destructor Documentation

## ◆ range() [1/2]

libdar::range::range | ( |  | ) |
| inline

Definition at line 46 of file range.hpp.

## ◆ range() [2/2]

libdar::range::range | ( | const infinint & | low,
|  | const infinint & | high )
| inline

Definition at line 47 of file range.hpp.

## Member Function Documentation

## ◆ clear()

void libdar::range::clear | ( |  | ) |
| inline

Definition at line 74 of file range.hpp.

## ◆ operator+()

range libdar::range::operator+ | ( | const range & | ref | ) | const
| inline

Definition at line 55 of file range.hpp.

## ◆ read_next_segment()

bool libdar::range::read_next_segment | ( | infinint & | low,
|  | infinint & | high ) const

read the next available segment

Parameters

  [out] | low | when read_next_segment() returns true, contains the low value of the next segment
  [out] | high | when read_next_segment() returns true, contains the high value of the next segment

Returns
  true and set the low and high value when a next segment is available in the range, returns false if all segment have been read low and high are not modified in that case.

## ◆ reset_read()

void libdar::range::reset_read | ( |  | ) | const
| inline

provides a way to read range contents segment by segment

Note
  reset_read() is to be called once then read_next_segment() will return true for each new segment giving in argument its low and high value when no more segment are available it returns false, reset_read() can be call at any time to reset the reading operation

Definition at line 64 of file range.hpp.

## Member Data Documentation

## ◆ parts

std::list<segment> libdar::range::parts
| private

Definition at line 105 of file range.hpp.

## ◆ read_cursor

std::list<segment>::const_iterator libdar::range::read_cursor
| mutable private

Definition at line 106 of file range.hpp.

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

- range.hpp