GazeTarget.h
Go to the documentation of this file.
1#pragma once
2
3#include <iosfwd>
4#include <optional>
5#include <string>
6
10
12
15
17{
18 /**
19 * @brief Business Object (BO) class of GazeTarget.
20 */
22 {
23 public:
24 // General properties
25 std::string name = "";
27 // Scheduler values
30 bool keepInQueue = false;
31 // Timestamps. The remaining lifecycle (reached, released, ...) is not part of the request:
32 // it is owned by the gaze scheduler and published as a GazeTargetStatus.
35
37
38 explicit GazeTarget(std::string targetName,
39 const FramedPosition& targetPosition,
42 bool keepInQueue);
43
44 bool isActive() const;
45 bool isExpired(std::optional<DateTime> reference = std::nullopt) const;
46
47 inline bool
48 operator<(const GazeTarget& rhs) const
49 {
50 return priority < rhs.priority;
51 };
52
53 inline bool
54 operator<=(const GazeTarget& rhs) const
55 {
56 return priority <= rhs.priority;
57 };
58
59 inline bool
60 operator==(const GazeTarget& rhs) const
61 {
62 return priority == rhs.priority;
63 };
64
65 inline bool
66 operator!=(const GazeTarget& rhs) const
67 {
68 return priority != rhs.priority;
69 };
70
71 inline bool
72 operator>=(const GazeTarget& rhs) const
73 {
74 return priority >= rhs.priority;
75 };
76
77 inline bool
78 operator>(const GazeTarget& rhs) const
79 {
80 return priority > rhs.priority;
81 };
82 };
83
84 ::std::ostream& operator<<(::std::ostream& os, const GazeTarget& target);
85
86} // namespace armarx::view_selection::gaze_targets
static DateTime Invalid()
Definition DateTime.cpp:57
static Duration MicroSeconds(std::int64_t microSeconds)
Constructs a duration in microseconds.
Definition Duration.cpp:24
The FramedPosition class.
Definition FramedPose.h:158
Represents a point in time.
Definition DateTime.h:25
Represents a duration.
Definition Duration.h:17
bool operator<=(const GazeTarget &rhs) const
Definition GazeTarget.h:54
bool operator>(const GazeTarget &rhs) const
Definition GazeTarget.h:78
bool isExpired(std::optional< DateTime > reference=std::nullopt) const
bool operator>=(const GazeTarget &rhs) const
Definition GazeTarget.h:72
bool operator!=(const GazeTarget &rhs) const
Definition GazeTarget.h:66
bool operator<(const GazeTarget &rhs) const
Definition GazeTarget.h:48
bool operator==(const GazeTarget &rhs) const
Definition GazeTarget.h:60
@ RandomEvent
Random Targets with lowest priority.
::std::ostream & operator<<(::std::ostream &os, const GazeTarget &target)