OTB
9.0.0
Orfeo Toolbox
|
#include <otbStandardOneLineFilterWatcher.h>
Public Member Functions | |
StandardOneLineFilterWatcher () | |
StandardOneLineFilterWatcher (itk::ProcessObject *process, const char *comment="") | |
StandardOneLineFilterWatcher (itk::ProcessObject *process, const std::string &comment="") | |
~StandardOneLineFilterWatcher () override=default | |
Public Member Functions inherited from otb::FilterWatcherBase | |
FilterWatcherBase () | |
FilterWatcherBase (const FilterWatcherBase &) | |
FilterWatcherBase (itk::ProcessObject *process, const char *comment="") | |
std::string | GetComment () |
const char * | GetNameOfClass () |
itk::ProcessObject * | GetProcess () |
otb::Stopwatch & | GetStopwatch () |
void | operator= (const FilterWatcherBase &) |
virtual | ~FilterWatcherBase () |
int | m_StarsCount |
int | m_CurrentNbStars |
std::string | m_Buffer |
PrintCallbackType * | m_Callback |
std::shared_ptr< PrintCallbackType > | m_DefaultCallback |
void | SetStars (int count) |
const int & | GetStars () const |
void | SetCallback (PrintCallbackType *callback) |
void | ShowProgress () override |
void | StartFilter () override |
void | EndFilter () override |
Additional Inherited Members | |
Protected Types inherited from otb::FilterWatcherBase | |
typedef itk::SimpleMemberCommand< FilterWatcherBase > | CommandType |
Protected Member Functions inherited from otb::FilterWatcherBase | |
virtual void | ShowProgressCallback () |
virtual void | StartFilterCallback () |
virtual void | EndFilterCallback () |
Protected Attributes inherited from otb::FilterWatcherBase | |
otb::Stopwatch | m_Stopwatch |
std::string | m_Comment |
itk::ProcessObject::Pointer | m_Process |
CommandType::Pointer | m_StartFilterCommand |
CommandType::Pointer | m_EndFilterCommand |
CommandType::Pointer | m_ProgressFilterCommand |
unsigned long | m_StartTag |
unsigned long | m_EndTag |
unsigned long | m_ProgressTag |
bool | m_Started |
bool | m_Ended |
This class shows the percentage progress execution of the pipeline filtering process.
This class is based on Observer design patter Abstract class ProcessObject is the subject Event are observers
Usage example:
Definition at line 58 of file otbStandardOneLineFilterWatcher.h.
otb::StandardOneLineFilterWatcher< PrintCallbackType >::StandardOneLineFilterWatcher | ( | itk::ProcessObject * | process, |
const char * | comment = "" |
||
) |
Constructor. Takes a ProcessObject to monitor and an optional comment string that is prepended to each event message.
Definition at line 42 of file otbStandardOneLineFilterWatcher.hxx.
otb::StandardOneLineFilterWatcher< PrintCallbackType >::StandardOneLineFilterWatcher | ( | itk::ProcessObject * | process, |
const std::string & | comment = "" |
||
) |
Definition at line 50 of file otbStandardOneLineFilterWatcher.hxx.
otb::StandardOneLineFilterWatcher< PrintCallbackType >::StandardOneLineFilterWatcher |
Default constructor
Definition at line 35 of file otbStandardOneLineFilterWatcher.hxx.
|
overridedefault |
Destrucotr
|
overrideprotectedvirtual |
Callback method to show the EndEvent
Implements otb::FilterWatcherBase.
Definition at line 109 of file otbStandardOneLineFilterWatcher.hxx.
|
inline |
Stars counting
Definition at line 78 of file otbStandardOneLineFilterWatcher.h.
|
inline |
Set the callback class
Definition at line 85 of file otbStandardOneLineFilterWatcher.h.
|
inline |
Get/Set number of stars
Definition at line 74 of file otbStandardOneLineFilterWatcher.h.
|
overrideprotectedvirtual |
Callback method to show the ProgressEvent
Implements otb::FilterWatcherBase.
Definition at line 58 of file otbStandardOneLineFilterWatcher.hxx.
|
overrideprotectedvirtual |
Callback method to show the StartEvent
Implements otb::FilterWatcherBase.
Definition at line 103 of file otbStandardOneLineFilterWatcher.hxx.
|
private |
If the output is not interactive (e.g. it is redirected to a file), it is buffered and only written at the end of the processing
Definition at line 110 of file otbStandardOneLineFilterWatcher.h.
|
private |
The point to the callback used for printing. It is set to the default callback on construction and can be changed later using the setter. Delete will not be called on this pointer.
Definition at line 115 of file otbStandardOneLineFilterWatcher.h.
|
private |
Current number of stars, we keep track of this to avoid reprinting the progress if it hasn't changed
Definition at line 106 of file otbStandardOneLineFilterWatcher.h.
|
private |
A default callback created in the constructor and deleted in the destructor.
Definition at line 119 of file otbStandardOneLineFilterWatcher.h.
|
private |
Stars counting
Definition at line 102 of file otbStandardOneLineFilterWatcher.h.