KiCad PCB EDA Suite
Loading...
Searching...
No Matches
CLI_PROGRESS_REPORTER Class Reference

Reporter forwarding messages to stdout or stderr as appropriate. More...

#include <cli_progress_reporter.h>

Inheritance diagram for CLI_PROGRESS_REPORTER:
PROGRESS_REPORTER

Public Member Functions

 CLI_PROGRESS_REPORTER ()
 
virtual ~CLI_PROGRESS_REPORTER ()
 
virtual void SetNumPhases (int aNumPhases) override
 Set the number of phases.
 
virtual void AddPhases (int aNumPhases) override
 
virtual void BeginPhase (int aPhase) override
 Initialize the aPhase virtual zone of the dialog progress bar.
 
virtual void AdvancePhase () override
 Use the next available virtual zone of the dialog progress bar.
 
virtual void AdvancePhase (const wxString &aMessage) override
 Use the next available virtual zone of the dialog progress bar and updates the message.
 
virtual void Report (const wxString &aMessage) override
 Display aMessage in the progress bar dialog.
 
virtual void SetCurrentProgress (double aProgress) override
 Set the progress value to aProgress (0..1).
 
virtual void SetMaxProgress (int aMaxProgress) override
 Fix the value that gives the 100 percent progress bar length (inside the current virtual zone).
 
virtual void AdvanceProgress () override
 Increment the progress bar length (inside the current virtual zone).
 
virtual bool KeepRefreshing (bool aWait=false) override
 Update the UI (if any).
 
virtual void SetTitle (const wxString &aTitle) override
 Change the title displayed on the window caption.
 
virtual bool IsCancelled () const override
 

Static Public Member Functions

static PROGRESS_REPORTERGetInstance ()
 

Private Member Functions

void printLine (const wxString &aMessage)
 

Detailed Description

Reporter forwarding messages to stdout or stderr as appropriate.

Definition at line 33 of file cli_progress_reporter.h.

Constructor & Destructor Documentation

◆ CLI_PROGRESS_REPORTER()

CLI_PROGRESS_REPORTER::CLI_PROGRESS_REPORTER ( )
inline

Definition at line 36 of file cli_progress_reporter.h.

◆ ~CLI_PROGRESS_REPORTER()

virtual CLI_PROGRESS_REPORTER::~CLI_PROGRESS_REPORTER ( )
inlinevirtual

Definition at line 38 of file cli_progress_reporter.h.

Member Function Documentation

◆ AddPhases()

virtual void CLI_PROGRESS_REPORTER::AddPhases ( int  aNumPhases)
inlineoverridevirtual

Implements PROGRESS_REPORTER.

Definition at line 46 of file cli_progress_reporter.h.

◆ AdvancePhase() [1/2]

virtual void CLI_PROGRESS_REPORTER::AdvancePhase ( )
inlineoverridevirtual

Use the next available virtual zone of the dialog progress bar.

Implements PROGRESS_REPORTER.

Definition at line 56 of file cli_progress_reporter.h.

◆ AdvancePhase() [2/2]

void CLI_PROGRESS_REPORTER::AdvancePhase ( const wxString &  aMessage)
overridevirtual

Use the next available virtual zone of the dialog progress bar and updates the message.

Implements PROGRESS_REPORTER.

Definition at line 36 of file cli_progress_reporter.cpp.

References printLine().

◆ AdvanceProgress()

virtual void CLI_PROGRESS_REPORTER::AdvanceProgress ( )
inlineoverridevirtual

Increment the progress bar length (inside the current virtual zone).

Implements PROGRESS_REPORTER.

Definition at line 82 of file cli_progress_reporter.h.

◆ BeginPhase()

virtual void CLI_PROGRESS_REPORTER::BeginPhase ( int  aPhase)
inlineoverridevirtual

Initialize the aPhase virtual zone of the dialog progress bar.

Implements PROGRESS_REPORTER.

Definition at line 51 of file cli_progress_reporter.h.

◆ GetInstance()

PROGRESS_REPORTER & CLI_PROGRESS_REPORTER::GetInstance ( )
static

◆ IsCancelled()

virtual bool CLI_PROGRESS_REPORTER::IsCancelled ( ) const
inlineoverridevirtual

Implements PROGRESS_REPORTER.

Definition at line 102 of file cli_progress_reporter.h.

◆ KeepRefreshing()

virtual bool CLI_PROGRESS_REPORTER::KeepRefreshing ( bool  aWait = false)
inlineoverridevirtual

Update the UI (if any).

Warning
This should only be called from the main thread.
Returns
false if the user cancelled.

Implements PROGRESS_REPORTER.

Definition at line 91 of file cli_progress_reporter.h.

◆ printLine()

void CLI_PROGRESS_REPORTER::printLine ( const wxString &  aMessage)
private

Definition at line 48 of file cli_progress_reporter.cpp.

Referenced by AdvancePhase(), and Report().

◆ Report()

void CLI_PROGRESS_REPORTER::Report ( const wxString &  aMessage)
overridevirtual

Display aMessage in the progress bar dialog.

Implements PROGRESS_REPORTER.

Definition at line 42 of file cli_progress_reporter.cpp.

References printLine().

◆ SetCurrentProgress()

virtual void CLI_PROGRESS_REPORTER::SetCurrentProgress ( double  aProgress)
inlineoverridevirtual

Set the progress value to aProgress (0..1).

Implements PROGRESS_REPORTER.

Definition at line 71 of file cli_progress_reporter.h.

◆ SetMaxProgress()

virtual void CLI_PROGRESS_REPORTER::SetMaxProgress ( int  aMaxProgress)
inlineoverridevirtual

Fix the value that gives the 100 percent progress bar length (inside the current virtual zone).

Implements PROGRESS_REPORTER.

Definition at line 77 of file cli_progress_reporter.h.

◆ SetNumPhases()

virtual void CLI_PROGRESS_REPORTER::SetNumPhases ( int  aNumPhases)
inlineoverridevirtual

Set the number of phases.

Implements PROGRESS_REPORTER.

Definition at line 45 of file cli_progress_reporter.h.

◆ SetTitle()

virtual void CLI_PROGRESS_REPORTER::SetTitle ( const wxString &  aTitle)
inlineoverridevirtual

Change the title displayed on the window caption.

Has meaning only for some reporters. Does nothing for others.

Warning
This should only be called from the main thread.

Implements PROGRESS_REPORTER.

Definition at line 100 of file cli_progress_reporter.h.


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