Wyatt
1.0.1
Main Page
Classes
Files
File List
include
commands
Command.h
1
#pragma once
2
3
#include <string>
4
#include <mutex>
5
6
class
Command
{
7
public
:
11
Command
();
15
virtual
~Command
();
16
20
void
init
();
30
virtual
bool
execute
() = 0;
37
virtual
bool
cleanup
(
bool
canceled) = 0;
47
void
cancel
();
53
void
stop
();
58
bool
isRunning
();
63
bool
isInitialized
();
68
void
setIsRunning
(
bool
value);
73
bool
isFinished
();
74
protected
:
76
std::mutex
m_lock
;
77
private
:
79
bool
m_is_running =
false
;
81
bool
m_is_initialized =
false
;
83
bool
m_is_finished =
false
;
84
};
Command::isInitialized
bool isInitialized()
Definition:
Command.cpp:49
Command::Command
Command()
Definition:
Command.cpp:7
Command::setIsRunning
void setIsRunning(bool value)
Definition:
Command.cpp:57
Command::cancel
void cancel()
Definition:
Command.cpp:23
Command::stop
void stop()
Definition:
Command.cpp:32
Command::~Command
virtual ~Command()
Definition:
Command.cpp:12
Command::m_lock
std::mutex m_lock
Lock for managing access to member variables in a thread-safe manner.
Definition:
Command.h:76
Command::cleanup
virtual bool cleanup(bool canceled)=0
Command
Definition:
Command.h:6
Command::init
void init()
Definition:
Command.cpp:16
Command::execute
virtual bool execute()=0
Command::isFinished
bool isFinished()
Definition:
Command.cpp:64
Command::isRunning
bool isRunning()
Definition:
Command.cpp:41
Generated by
1.8.11