Wyatt
1.0.1
Main Page
Classes
Files
File List
include
CommandManager.h
1
//
2
// Created by Arthur Lockman on 4/5/17.
3
//
4
5
#pragma once
6
7
#include "Command.h"
8
#include "Thread.h"
9
#include <list>
10
#include <iostream>
11
#include <map>
12
#include <mutex>
13
17
class
CommandManager
:
public
Thread
{
18
public
:
22
CommandManager
();
26
~CommandManager
();
34
bool
runCommand
(
Command
*command);
41
bool
cancel
(
Command
* command);
46
bool
cancelAll
();
51
void
*
run
();
56
int
join
();
61
int
kill
();
66
unsigned
long
inFlight
();
67
private
:
69
std::list<Command*> m_commands;
71
std::map<Command*, int> m_command_flags;
73
std::mutex mtx;
74
};
CommandManager::CommandManager
CommandManager()
Definition:
CommandManager.cpp:7
CommandManager::run
void * run()
Definition:
CommandManager.cpp:45
CommandManager::cancel
bool cancel(Command *command)
Definition:
CommandManager.cpp:27
CommandManager::join
int join()
Definition:
CommandManager.cpp:73
CommandManager::kill
int kill()
Definition:
CommandManager.cpp:80
CommandManager::~CommandManager
~CommandManager()
Definition:
CommandManager.cpp:13
Thread
Definition:
Thread.h:32
CommandManager::cancelAll
bool cancelAll()
Definition:
CommandManager.cpp:35
Command
Definition:
Command.h:6
CommandManager::runCommand
bool runCommand(Command *command)
Definition:
CommandManager.cpp:18
CommandManager::inFlight
unsigned long inFlight()
Definition:
CommandManager.cpp:85
CommandManager
Definition:
CommandManager.h:17
Generated by
1.8.11