Struct ITelegram

Inheritance Relationships

Derived Type

Struct Documentation

struct ITelegram

Interface for controller of algorithm.

Subclassed by gwm::Logger

Public Types

enum class LogLevel

Level of logs.

Values:

enumerator LOG_EMERG

The message says the system is unusable.

enumerator LOG_ALERT

Action on the message must be taken immediately.

enumerator LOG_CRIT

The message states a critical condition.

enumerator LOG_ERR

The message describes an error.

enumerator LOG_WARNING

The message is a warning.

enumerator LOG_NOTICE

The message describes a normal but important event.

enumerator LOG_INFO

The message is purely informational.

enumerator LOG_DEBUG

The message is only for debugging purposes.

Public Functions

inline virtual ~ITelegram()
virtual void print(std::string message, ITelegram::LogLevel level, std::string fun_name, std::string file_name) = 0

Call printer to print a log. Log message Log level Caller function name The file where caller function is defined.

virtual void progress(std::size_t current, std::size_t total, std::string fun_name, std::string file_name) = 0

Report the progress of this algorithm. Current progress. Total number of progress.

virtual void progress(double percent, std::string fun_name, std::string file_name) = 0

Report the progress of this algorithm. Current percentage of total progress.

virtual bool stop() = 0

Tell the algorithm whether to stop. Yes, stop progress. No, don’t stop progress.