Agroeye  1.0
Callback.h
Go to the documentation of this file.
1 #ifndef CALLBACK_H
2 #define CALLBACK_H
3 
4 #include <functional>
5 #include <algorithm>
6 #include <vector>
7 #include <string>
8 #include <iostream>
9 
10 namespace agroeye {
11 namespace general {
12 
17 enum class CallbackTypes {
18  PROGRESS,
19  INFO,
20  DEBUG,
21  ERROR
22 };
23 
24 using ListCallbackTypes = std::vector<CallbackTypes>;
25 using CallbackFunction = std::function<void(double, ListCallbackTypes, std::string)>;
35 void defaultCallback(double progress, ListCallbackTypes listTypes, std::string message);
36 
37 
43 void silenceCallback(double progress, ListCallbackTypes listTypes, std::string message);
44 
45 
46 
47 
48 
49 } // namespace general
50 } // namespace agroeye
51 
52 #endif
CallbackTypes
Type of callback that can be called function.
Definition: Callback.h:17
Definition: ContainerMath.h:11
std::vector< CallbackTypes > ListCallbackTypes
Definition: Callback.h:24
std::function< void(double, ListCallbackTypes, std::string)> CallbackFunction
Definition: Callback.h:25
void defaultCallback(double progress, ListCallbackTypes listTypes, std::string message)
A default callback.
Definition: Callback.cpp:6
void silenceCallback(double progress, ListCallbackTypes listTypes, std::string message)
Silencing callback.
Definition: Callback.cpp:17