Xmipp  v3.23.11-Nereus
Public Member Functions | List of all members
TextualListener Class Reference

#include <xmipp_funcs.h>

Inheritance diagram for TextualListener:
Inheritance graph
[legend]
Collaboration diagram for TextualListener:
Collaboration graph
[legend]

Public Member Functions

virtual void OnInitOperation (unsigned long _est_it)
 
virtual void OnProgress (unsigned long _it)
 
virtual void OnReportOperation (const std::string &_rsOp)
 
- Public Member Functions inherited from BaseListener
 BaseListener ()
 
virtual ~BaseListener ()
 
virtual const unsigned & getVerbosity () const
 
virtual unsigned & setVerbosity ()
 
virtual const bool & OnUserCancel () const
 
virtual bool & setCancel ()
 

Detailed Description

TextualListener

This class implements the xmipp classical textual listener class for notification of progress status. It inherits from BaseListener.

This class is not ported to Python.

Definition at line 1107 of file xmipp_funcs.h.

Member Function Documentation

◆ OnInitOperation()

void TextualListener::OnInitOperation ( unsigned long  _est_it)
virtual

Initialize progress bar

_est_it: Defines the estimated number of iterations

This method will initialize the progress bar with the number of estimated iterations.

Implements BaseListener.

Definition at line 874 of file xmipp_funcs.cpp.

875 {
876  progress_bar(-static_cast<long>(_est_it));
877 }
void progress_bar(long rlen)

◆ OnProgress()

void TextualListener::OnProgress ( unsigned long  _it)
virtual

Show a textual bar with the progress in time

When the input is negative then we are setting the progress bar, this will be the total of elements to process. Afterwards the call to this routine must be in ascending order, ie, 0, 1, 2, ... No. elements The elapsed and estimation time is also shown in the output console. _it: iteration number

Implements BaseListener.

Definition at line 886 of file xmipp_funcs.cpp.

887 {
888  progress_bar(_it);
889 }
void progress_bar(long rlen)

◆ OnReportOperation()

void TextualListener::OnReportOperation ( const std::string &  _rsOp)
virtual

Shows a message indicating the operation

_rsop: string message

Implements BaseListener.

Definition at line 892 of file xmipp_funcs.cpp.

893 {
894  fprintf(stderr, "%s", _rsOp.c_str());// std::cout << _rsOp;
895 }
fprintf(glob_prnt.io, "\)

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