VRS
A file format for sensor data.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vrs::SilentLogger Class Reference

Progress logger to ignore all progress notifications. More...

#include <ProgressLogger.h>

Inheritance diagram for vrs::SilentLogger:
vrs::ProgressLogger

Public Member Functions

bool logProgress (const string &, size_t=0, size_t=100, bool=false) override
 
bool logStatus (const string &, int=0) override
 
bool logDuration (const string &, double, int=1) override
 
- Public Member Functions inherited from vrs::ProgressLogger
 ProgressLogger (bool detailedProgress=false, double updateDelay=kDefaultUpdateDelay)
 
virtual void setStepCount (int stepCount)
 
virtual void setDetailedProgress (bool detailedProgress)
 
bool getDetailedProgress () const
 
virtual bool logNewStep (const string &stepName, size_t progress=0, size_t maxProgress=100)
 
bool logProgress (const string &stepName, size_t progress=0, size_t maxProgress=100)
 
bool logProgress (const string &stepName, int64_t progress, int64_t maxProgress)
 

Additional Inherited Members

- Static Public Attributes inherited from vrs::ProgressLogger
static constexpr double kDefaultUpdateDelay = 2
 
- Protected Member Functions inherited from vrs::ProgressLogger
virtual void logMessage (const string &message)
 
virtual void logErrorMessage (const string &message)
 
virtual void updateStep (size_t progress=0, size_t maxProgress=100)
 
virtual void updateNextProgressTime ()
 Callback to schedule the time of the next text update.
 
virtual bool shouldKeepGoing ()
 
- Protected Attributes inherited from vrs::ProgressLogger
bool detailedProgress_
 
double updateDelay_
 
int stepNumber_
 
int stepCount_
 
double nextProgressTime_
 

Detailed Description

Progress logger to ignore all progress notifications.

Member Function Documentation

◆ logDuration()

bool vrs::SilentLogger::logDuration ( const string &  operationName,
double  duration,
int  precision = 1 
)
inlineoverridevirtual

Log that an operation was performed in a specific duration.

Parameters
operationNametext describing the operation.
durationnumber of seconds the operation lasted.
precisionprecision to use when printing the duration.
Returns
True if the operation should continue, false if it should be cancelled.

Reimplemented from vrs::ProgressLogger.

◆ logProgress()

bool vrs::SilentLogger::logProgress ( const string &  stepName,
size_t  progress = 0,
size_t  maxProgress = 100,
bool  newStep = false 
)
inlineoverridevirtual
Parameters
stepNamethe name of the step.
progressthe current progress in the step.
maxProgressthe max value of the progress counter in the step.
newSteptells if the step is a new step (for internal use).
Returns
True if the operation should continue, false if it should be cancelled.

Reimplemented from vrs::ProgressLogger.

◆ logStatus()

bool vrs::SilentLogger::logStatus ( const string &  stepName,
int  status = 0 
)
inlineoverridevirtual

Log that a step is completed, with a specific status.

Parameters
stepNamethe name of the step.
status0 on success, otherwise, the step is considered failed.
Returns
True if the operation should continue, false if it should be cancelled.

Reimplemented from vrs::ProgressLogger.


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