bkcrack 1.7.1
Crack legacy zip encryption with Biham and Kocher's known plaintext attack.
Progress Class Reference

Structure to report the progress of a long operation or to cancel it. More...

#include <Progress.hpp>

Inheritance diagram for Progress:
ConsoleProgress

Public Types

enum class  State { Normal , Canceled , EarlyExit }
 Possible states of a long operation. More...

Public Member Functions

 Progress (std::ostream &os)
 Constructor.
template<typename F>
void log (F f)

Public Attributes

std::atomic< Statestate = State::Normal
 State of the long operation.
std::atomic< int > done = 0
 Number of steps already done.
std::atomic< int > total = 0
 Total number of steps.

Detailed Description

Structure to report the progress of a long operation or to cancel it.

Member Enumeration Documentation

◆ State

enum class Progress::State
strong

Possible states of a long operation.

Enumerator
Normal 

The operation is ongoing or is fully completed.

Canceled 

The operation has been canceled externally.

EarlyExit 

The operation stopped after a partial result was found.

Member Function Documentation

◆ log()

template<typename F>
void Progress::log ( F f)
inline

Get exclusive access to the shared output stream and output progress information with the given function


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