Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
Antares::Toolbox::Jobs::Job Class Referenceabstract
Inheritance diagram for Antares::Toolbox::Jobs::Job:
Antares::Forms::JobLoadScenarioBuilder Antares::Toolbox::Process::JobExecute

Public Member Functions

Constructor & Destructor
 Job (const wxString &title, const wxString &subTitle, const char *icon)
 Constructor.
 
virtual ~Job ()
 Destructor.
 
Progression
bool displayProgression () const
 
void displayProgression (const bool v)
 
Cancelation
bool canCancel () const
 
void canCancel (const bool v)
 
Result
bool result () const
 
void result (const bool v)
 

Execution flow

class JobThread
 
class TimerElapsedTime
 
class TimerRemainingTime
 
bool isRunning () const
 Get if the job is running.
 
bool run ()
 Run the job.
 
void stop ()
 Stop the job gracefully.
 
virtual bool executeTask ()=0
 Execute the real task.
 
void updateTheProgressValue (double progress)
 Update the progress value.
 
void updateTheMessage (const wxString &msg, bool mustBeInterpreted=true)
 Update the message displayed for the user.
 
virtual void onBeforeRunning ()
 Event: Before the thread is launched.
 
virtual bool onRunQuery ()
 Event: Ask if the job is allow to run.
 
virtual void onCancel ()
 Event: The user ask to cancel the operation.
 
void stopAllGuiComponents ()
 Gracefully Stop all Gui components.
 
void manageLogLevelMessage (enum LogLevel lvl, const wxString &msg)
 Dispatch a log entry, grabbed from from the standard output.
 
void onCancel (void *)
 Event: The user asks to cancel the operation.
 
void evtOnClose (wxCloseEvent &evt)
 
void onLogMessage (int, const std::string &message)
 
wxSizer * createMainPnl (wxWindow *parent)
 Create the main panel, which contains all important controls.
 
wxSizer * createPnlButtons (wxWindow *parent)
 Create the bottom panel, which contains buttons to cancel and to continue.
 
wxSizer * createPnlLoading (wxWindow *parent)
 
void displayGauge (const bool visible=true)
 Display (or not) the gauge.
 
void displayMessage (const wxString &line)
 
void onUIUpdateProgression (uint value)
 
void onUIUpdateMessage ()
 
void onUIUpdateLabelErrors ()
 
void onUIUpdateElapsedTime (const Yuni::String &text)
 
void onUIUpdateRemainingTime (const Yuni::String &text)
 
void evtOnInit (wxInitDialogEvent &event)
 
void deleteAllThreads ()
 
void recomputeWindowSize ()
 
void disableAllComponents ()
 

Member Function Documentation

◆ executeTask()

virtual bool Antares::Toolbox::Jobs::Job::executeTask ( )
protectedpure virtual

◆ onBeforeRunning()

virtual void Antares::Toolbox::Jobs::Job::onBeforeRunning ( )
inlineprotectedvirtual

Event: Before the thread is launched.

This method will be fired before the thread is launched when the job is asked to run.

See also
run()

Reimplemented in Antares::Toolbox::Process::JobExecute.

◆ onCancel()

virtual void Antares::Toolbox::Jobs::Job::onCancel ( )
inlineprotectedvirtual

Event: The user ask to cancel the operation.

Reimplemented in Antares::Toolbox::Process::JobExecute.

◆ onRunQuery()

virtual bool Antares::Toolbox::Jobs::Job::onRunQuery ( )
inlineprotectedvirtual

Event: Ask if the job is allow to run.

This method is fired before running the job. It is actually thefirst check done by the method run()

See also
run()

Reimplemented in Antares::Toolbox::Process::JobExecute.

◆ onUIUpdateMessage()

void Antares::Toolbox::Jobs::Job::onUIUpdateMessage ( )
protected

Updating the message for the user

◆ updateTheMessage()

void Antares::Toolbox::Jobs::Job::updateTheMessage ( const wxString & msg,
bool mustBeInterpreted = true )
protected

Update the message displayed for the user.

Parameters
msgThe new message
mustBeInterpretedTrue if the message must be interpreted (format: [antares][notice] msg)

◆ updateTheProgressValue()

void Antares::Toolbox::Jobs::Job::updateTheProgressValue ( double progress)
protected

Update the progress value.

Parameters
progressThe progression in percent

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