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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#ifndef CVVISUAL_CALL_HPP
#define CVVISUAL_CALL_HPP
#include <utility>
#include <QString>
#include "opencv2/core.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/cvv/call_meta_data.hpp"
namespace cvv
{
namespace impl
{
/**
* @brief Returns a new, unique id for calls.
*/
size_t newCallId();
/**
* @brief Baseclass for all calls. Provides access to the common functionality.
*/
class Call
{
public:
virtual ~Call()
{
}
/**
* @brief Returns the unique id of the call.
*/
size_t getId() const
{
return id;
}
/**
* Returns a string that identifies what kind of call this is.
*/
const QString &type() const
{
return calltype;
}
/**
* @brief Returns the number of images that are part of the call.
*/
virtual size_t matrixCount() const = 0;
/**
* Returns the n'th matrix that is involved in the call.
*
* @throws std::out_of_range if index is higher then matrixCount().
*/
virtual const cv::Mat &matrixAt(size_t index) const = 0;
/**
* @brief provides a description of the call.
*/
const QString &description() const
{
return description_;
}
/**
* @brief Returns a string which view was requested by the caller of the
* API.
*/
const QString &requestedView() const
{
return requestedView_;
}
/**
* @brief Provides read-access to the meta-data of the call (from where
* it came).
*/
const CallMetaData &metaData() const
{
return metaData_;
}
protected:
/**
* @brief Default-construcs a new Call with a new, unique ID.
*/
Call();
/**
* @brief Construcs a new Call with a new, unique ID and the provided
* data.
*/
Call(impl::CallMetaData callData, QString type, QString description,
QString requestedView);
Call(const Call &) = default;
Call(Call &&) = default;
impl::CallMetaData metaData_;
size_t id;
QString calltype;
QString description_;
QString requestedView_;
};
}
} // namespaces
#endif