-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImageLoop.h
48 lines (39 loc) · 1.06 KB
/
ImageLoop.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef IMAGELOOP_H
#define IMAGELOOP_H
#include <iostream>
#include <stdlib.h>
#include <unordered_map>
#include <string>
#include "ImageProcessor.h"
using namespace std;
/**
* ImageLoop class that runs the overall loop functionality which will take in
* inputs from the user and then call to the ImageProcessor to run the functions
* @author Alberto Scicali
*/
class ImageLoop {
public:
/**
* Constuctor for the ImageLoop class
* @param is Cin buffer stream to read in user input
*/
ImageLoop(istream& is);
/**
* Runs the looping functionality of the program until the user enters the "quit" command
*/
void MainLoop();
private:
/**
* Mains the curren input buffer stream to take in user commands
*/
istream& _in;
/**
* ImageProcessor class which is called upon to process images
*/
ImageProcessor _imageProcessor;
/**
* Unordered Map of commands which has lambda functions mapped to the users input
*/
unordered_map<string, function<void ()>> _commands;
};
#endif //IMAGELOOP_H