CodeSubWars 0.4.7b
CodeSubWars::CSWPyCommand Class Referenceabstract

#include <CSWPyCommands.h>

Inheritance diagram for CodeSubWars::CSWPyCommand:

Public Member Functions

virtual void initialize ()=0
virtual void step ()=0
virtual void cleanup ()=0
virtual std::string getDetails () const
void setProgress (double fProgress)
void finished ()
- Public Member Functions inherited from ARSTD::Command
virtual PtrType copy () const =0
virtual std::string getName () const =0
virtual bool wasExecuted () const
virtual double getProgress () const

Detailed Description

The base class of Commands that are defined in python.

Member Function Documentation

◆ cleanup()

virtual void CodeSubWars::CSWPyCommand::cleanup ( )
pure virtual

This is called directly after finishing of execution or on breaking.

Implements ARSTD::Command.

◆ finished()

void CodeSubWars::CSWPyCommand::finished ( )

This indicates the execution environment that the command is done.

This method is only valid to call inside step().

◆ getDetails()

virtual std::string CodeSubWars::CSWPyCommand::getDetails ( ) const

Returns some interesting stuff about the current command state.

The detailed state depend command description.

Reimplemented from ARSTD::Command.

◆ initialize()

virtual void CodeSubWars::CSWPyCommand::initialize ( )
pure virtual

This is called directly before execution (before the first step() is called).

Implements ARSTD::Command.

◆ setProgress()

void CodeSubWars::CSWPyCommand::setProgress ( double  fProgress)

Sets the progress of command execution.

fProgressThe new progress of the execution in range [0, 1].

◆ step()

virtual void CodeSubWars::CSWPyCommand::step ( )
pure virtual

This is called periodically about every 10ms while executing. If the command is done finished() must be called. If finished() is never called the command never stops executing.

Implements ARSTD::Command.

Generated at Sun Aug 7 2022 for project CodeSubWars.