Wyatt
1.0.1
Main Page
Classes
Files
File List
test
mocks
SimpleIteratorCommand.cpp
1
//
2
// Created by Arthur Lockman on 4/7/17.
3
//
4
5
#include "../include/SimpleIteratorCommand.h"
6
7
SimpleIteratorCommand::SimpleIteratorCommand(
int
goal):
8
m_counter(0),
9
m_goal(goal),
10
Command
()
11
{
12
13
}
14
15
SimpleIteratorCommand::~SimpleIteratorCommand()
16
{
17
18
}
19
20
bool
SimpleIteratorCommand::execute
()
21
{
22
m_lock.lock();
23
m_counter++;
24
m_lock.unlock();
25
return
m_counter != m_goal;
26
}
27
28
int
SimpleIteratorCommand::getCount()
29
{
30
m_lock.lock();
31
int
count = m_counter;
32
m_lock.unlock();
33
return
count;
34
}
35
36
bool
SimpleIteratorCommand::cleanup
(
bool
canceled)
37
{
38
return
true
;
39
}
SimpleIteratorCommand::execute
bool execute()
Definition:
SimpleIteratorCommand.cpp:20
SimpleIteratorCommand::cleanup
bool cleanup(bool canceled)
Definition:
SimpleIteratorCommand.cpp:36
Command
Definition:
Command.h:6
Generated by
1.8.11