-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
44 lines (33 loc) · 1.65 KB
/
main.cpp
File metadata and controls
44 lines (33 loc) · 1.65 KB
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
#include <iostream>
#include <memory>
#include "util.h"
#include "Context/Context.h"
#include "Context/Operations/LoadImagesOperation.h"
#include "Context/Operations/LoadHardCodedPointsOperation.h"
#include "Context/Operations/RemoveAllImagesOperation.h"
#include "Context/Operations/RemoveAllPointsOperation.h"
#include "Context/Operations/BackProjectAllPointsOperation.h"
#include "Context/Operations/DisplayImageDetailsOperation.h"
#include "Context/Operations/EnterPointsOperation.h"
#include "Context/Operations/PurposelyBrokenOperation.h"
/**
* Entry point of the program.
* @return
*/
int main()
{
std::cout << "Initializing Context object.." << std::endl;
Context context;
//Register operations, so that they can be chosen in the menu, shown when in Context::Enter.
Context::registerOperation(std::shared_ptr<ContextOperation>(new LoadImagesOperation));
Context::registerOperation(std::shared_ptr<ContextOperation>(new LoadHardCodedPointsOperation));
Context::registerOperation(std::shared_ptr<ContextOperation>(new EnterPointsOperation));
Context::registerOperation(std::shared_ptr<ContextOperation>(new BackProjectAllPointsOperation));
Context::registerOperation(std::shared_ptr<ContextOperation>(new DisplayImageDetailsOperation));
Context::registerOperation(std::shared_ptr<ContextOperation>(new RemoveAllImagesOperation));
Context::registerOperation(std::shared_ptr<ContextOperation>(new RemoveAllPointsOperation));
Context::registerOperation(std::shared_ptr<ContextOperation>(new PurposelyBrokenOperation));
//Allow the user to interact with the context.
context.Enter(std::cout, std::cin);
return 0;
}