SourceXtractorPlusPlus
0.15
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEMain
SEMain
ProgressLogger.h
Go to the documentation of this file.
1
17
/*
18
* ProgressLogger.h
19
*
20
* Created on: Mar 19, 2019
21
* Author: Alejandro Alvarez Ayllon
22
*/
23
24
#ifndef _SEMAIN_PROGRESSLOGGER_H
25
#define _SEMAIN_PROGRESSLOGGER_H
26
27
#include "
SEMain/ProgressReporter.h
"
28
#include <
ElementsKernel/Logging.h
>
29
#include <chrono>
30
31
namespace
SourceXtractor {
32
38
class
ProgressLogger
:
public
ProgressReporter
{
39
public
:
40
virtual
~ProgressLogger
() =
default
;
41
47
ProgressLogger
(
const
std::chrono::steady_clock::duration& min_interval);
48
49
void
handleMessage
(
const
std::list<ProgressInfo>
& info)
override
;
50
51
void
handleMessage
(
const
bool
& done)
override
;
52
53
protected
:
54
Elements::Logging
m_logger
;
55
std::chrono::steady_clock::duration
m_min_interval
;
56
std::chrono::steady_clock::time_point
m_started
,
m_last_logged
;
57
std::list<ProgressInfo>
m_progress_info
;
58
std::atomic_bool
m_done
;
59
60
void
print
();
61
};
62
63
}
// end SourceXtractor
64
65
#endif // _SEMAIN_PROGRESSLOGGER_H
SourceXtractor::ProgressLogger::ProgressLogger
ProgressLogger(const std::chrono::steady_clock::duration &min_interval)
Definition:
ProgressLogger.cpp:22
Logging.h
ProgressReporter.h
SourceXtractor::ProgressLogger::m_last_logged
std::chrono::steady_clock::time_point m_last_logged
Definition:
ProgressLogger.h:56
SourceXtractor::ProgressLogger
Definition:
ProgressLogger.h:38
SourceXtractor::ProgressLogger::~ProgressLogger
virtual ~ProgressLogger()=default
Elements::Logging
SourceXtractor::ProgressReporter
Definition:
ProgressReporter.h:43
std::list
STL class.
SourceXtractor::ProgressLogger::m_done
std::atomic_bool m_done
Definition:
ProgressLogger.h:58
SourceXtractor::ProgressLogger::m_progress_info
std::list< ProgressInfo > m_progress_info
Definition:
ProgressLogger.h:57
SourceXtractor::ProgressLogger::m_logger
Elements::Logging m_logger
Definition:
ProgressLogger.h:54
SourceXtractor::ProgressLogger::print
void print()
Definition:
ProgressLogger.cpp:28
SourceXtractor::ProgressLogger::handleMessage
void handleMessage(const std::list< ProgressInfo > &info) override
Definition:
ProgressLogger.cpp:58
SourceXtractor::ProgressLogger::m_started
std::chrono::steady_clock::time_point m_started
Definition:
ProgressLogger.h:56
SourceXtractor::ProgressLogger::m_min_interval
std::chrono::steady_clock::duration m_min_interval
Definition:
ProgressLogger.h:55
Generated by
1.8.5