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
16
18{
19 /**
20 * @brief Business Object (BO) class of GazeTarget.
21 */
23 {
24 public:
25 // General properties
26 std::string name = "";
28 // Scheduler values
31 bool keepInQueue = false;
32 // Event logging
39
41
42 explicit GazeTarget(std::string targetName,
43 const FramedPosition& targetPosition,
46 bool keepInQueue);
47
48 bool isActive() const;
49 bool isReached() const;
50 bool isReleased() const;
51 bool isAborted() const;
52 bool isExpired(std::optional<DateTime> reference = std::nullopt) const;
53
54 inline bool
55 operator<(const GazeTarget& rhs) const
56 {
57 return priority < rhs.priority;
58 };
59
60 inline bool
61 operator<=(const GazeTarget& rhs) const
62 {
63 return priority <= rhs.priority;
64 };
65
66 inline bool
67 operator==(const GazeTarget& rhs) const
68 {
69 return priority == rhs.priority;
70 };
71
72 inline bool
73 operator!=(const GazeTarget& rhs) const
74 {
75 return priority != rhs.priority;
76 };
77
78 inline bool
79 operator>=(const GazeTarget& rhs) const
80 {
81 return priority >= rhs.priority;
82 };
83
84 inline bool
85 operator>(const GazeTarget& rhs) const
86 {
87 return priority > rhs.priority;
88 };
89 };
90
91 ::std::ostream& operator<<(::std::ostream& os, const GazeTarget& target);
92
93} // 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:61
bool operator>(const GazeTarget &rhs) const
Definition GazeTarget.h:85
bool isExpired(std::optional< DateTime > reference=std::nullopt) const
bool operator>=(const GazeTarget &rhs) const
Definition GazeTarget.h:79
bool operator!=(const GazeTarget &rhs) const
Definition GazeTarget.h:73
bool operator<(const GazeTarget &rhs) const
Definition GazeTarget.h:55
bool operator==(const GazeTarget &rhs) const
Definition GazeTarget.h:67
@ RandomEvent
Random Targets with lowest priority.
TargetStatus
Describes the type of attention.
@ Requested
commited to memory, waiting for scheduling
::std::ostream & operator<<(::std::ostream &os, const GazeTarget &target)