1 #ifndef NUITRACK_MIDDLEWARE_ISSUES_DATA_H_
2 #define NUITRACK_MIDDLEWARE_ISSUES_DATA_H_
8 #include "nuitrack/capi/IssueTracker_CAPI.h"
9 #include "nuitrack/types/ObjectData.h"
10 #include "nuitrack/types/Issue.h"
11 #include "nuitrack/types/Export.h"
12 #include "nuitrack/types/FrameBorderIssue.h"
13 #include "nuitrack/types/OcclusionIssue.h"
14 #include "nuitrack/types/SensorIssue.h"
31 nuitrack_AddIssueTrackerDataRef(pimpl);
36 nuitrack_DestroyIssueTrackerData(
_pimpl);
42 typedef std::shared_ptr<IssuesData>
Ptr;
49 template<
typename T> std::shared_ptr<T> NUITRACK_LOCAL
getIssue()
const
51 std::shared_ptr<T> result;
52 if(strcmp(T::getType().c_str(),
"SensorIssue") == 0)
56 const int bufferSize = 300;
58 buffer.resize(bufferSize);
59 if(nuitrack_GetSensorIssue(
_pimpl, (
char *)buffer.c_str(), bufferSize))
61 buffer.resize(strlen(buffer.c_str()));
65 result = std::shared_ptr<T>(
static_cast<T*
>(issue));
76 template<
typename T> std::shared_ptr<T> NUITRACK_LOCAL
getUserIssue(
int userId)
const
78 std::shared_ptr<T> result;
80 if(strcmp(T::getType().c_str(),
"OcclusionIssue") == 0)
82 bool occlusion = nuitrack_GetOcclusionIssue(
_pimpl, userId);
88 result = std::shared_ptr<T>(
static_cast<T*
>(issue));
91 if(strcmp(T::getType().c_str(),
"FrameBorderIssue") == 0)
96 nuitrack_GetFrameBorderIssue(
_pimpl, userId, &left, &right, &top);
98 if(left || right || top)
102 result = std::shared_ptr<T>(
static_cast<T*
>(issue));
IssueTrackerData * _pimpl
Definition: IssuesData.h:109
std::shared_ptr< T > NUITRACK_LOCAL getUserIssue(int userId) const
Returns information about user related issue detected.
Definition: IssuesData.h:76
Represents the sensor issue.
Definition: SensorIssue.h:18
IssuesData(IssueTrackerData *pimpl)
Definition: IssuesData.h:28
Stores general information about a issue.
Definition: Issue.h:30
Represents the occlusion issue.
Definition: OcclusionIssue.h:14
std::shared_ptr< T > NUITRACK_LOCAL getIssue() const
Returns information about sensor related issue detected.
Definition: IssuesData.h:49
Stores results of issue detection.
Definition: IssuesData.h:24
std::shared_ptr< IssuesData > Ptr
Smart pointer to access the IssuesData instance.
Definition: IssuesData.h:42
Represents the frame bodrer issue.
Definition: FrameBorderIssue.h:19