Wyatt  1.0.1
Public Member Functions | List of all members
SimpleIteratorCommand Class Reference

#include <SimpleIteratorCommand.h>

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

Public Member Functions

 SimpleIteratorCommand (int goal)
 
bool execute ()
 
bool cleanup (bool canceled)
 
int getCount ()
 
- Public Member Functions inherited from Command
 Command ()
 
virtual ~Command ()
 
void init ()
 
void cancel ()
 
void stop ()
 
bool isRunning ()
 
bool isInitialized ()
 
void setIsRunning (bool value)
 
bool isFinished ()
 

Additional Inherited Members

- Protected Attributes inherited from Command
std::mutex m_lock
 Lock for managing access to member variables in a thread-safe manner.
 

Detailed Description

Mock command to check the CommandManager class.

Definition at line 13 of file SimpleIteratorCommand.h.

Member Function Documentation

bool SimpleIteratorCommand::cleanup ( bool  canceled)
virtual

This method is called to cleanup the command (whenever the stop method is called).

Parameters
canceledtrue if command was canceled, false otherwise.
Returns
True if successful.

Implements Command.

Definition at line 36 of file SimpleIteratorCommand.cpp.

bool SimpleIteratorCommand::execute ( )
virtual

This method is called periodically during the command execution. Think of it like the Arduino's loop() function. While the command is executing this will be called repeatedly. Do not include while loops in here.

Returns
false if the command is done, true if it needs to continue.

Implements Command.

Definition at line 20 of file SimpleIteratorCommand.cpp.


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