TargetPriority.cpp
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package view_selection::ArmarXObjects::client
17 * @author Johann Mantel ( j-mantel at gmx dot net )
18 * @date 2022
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#include "TargetPriority.h"
24
25#include <iostream>
26
28{
33
34 bool
36 {
37 return attentionType < rhs.attentionType ||
39 }
40
41 bool
43 {
44 return attentionType < rhs.attentionType ||
46 }
47
48 bool
50 {
51 return attentionType == rhs.attentionType && priority == rhs.priority;
52 }
53
54 bool
56 {
57 return attentionType != rhs.attentionType || priority != rhs.priority;
58 }
59
60 bool
62 {
63 return attentionType > rhs.attentionType ||
65 }
66
67 bool
69 {
70 return attentionType > rhs.attentionType ||
72 }
73
74 std::ostream&
75 operator<<(std::ostream& os, const TargetPriority& prio)
76 {
77 return os << "{ " << AttentionTypeNames.to_name(prio.attentionType) << ", " << prio.priority
78 << " }";
79 }
80
81} // namespace armarx::view_selection::gaze_targets
bool operator>=(const TargetPriority &rhs) const
bool operator<(const TargetPriority &rhs) const
bool operator>(const TargetPriority &rhs) const
bool operator==(const TargetPriority &rhs) const
AttentionType attentionType
The type of attention, defining the first level of priority.
bool operator<=(const TargetPriority &rhs) const
TargetPriority(const AttentionType &attentionType=AttentionType::RandomEvent, double priority=-1)
bool operator!=(const TargetPriority &rhs) const
double priority
The priority among GazeTargets of same AttentionType.
const simox::meta::EnumNames< AttentionType > AttentionTypeNames
AttentionType
Describes the type of attention.
::std::ostream & operator<<(::std::ostream &os, const GazeTarget &target)