34class ARCANE_CORE_EXPORT ItemUniqueId
38 ItemUniqueId() =
default;
39 constexpr ARCCORE_HOST_DEVICE
explicit ItemUniqueId(
Int64 uid)
43 constexpr ARCCORE_HOST_DEVICE
operator Int64()
const {
return m_unique_id; }
44 ARCANE_DEPRECATED
operator Int32()
const {
return asInt32(); }
45 constexpr ARCCORE_HOST_DEVICE
Int64 asInt64()
const {
return m_unique_id; }
46 Int32 asInt32()
const;
58 friend inline bool operator<(ItemUniqueId lhs, ItemUniqueId rhs)
60 return lhs.asInt64() < rhs.asInt64();
62 friend inline bool operator<(
Int64 lhs, ItemUniqueId rhs)
64 return lhs < rhs.asInt64();
66 friend inline bool operator<(ItemUniqueId lhs,
Int32 rhs)
68 return lhs.asInt64() < rhs;
70 friend inline bool operator<(
Int32 lhs, ItemUniqueId rhs)
72 return lhs < rhs.asInt64();
74 friend inline bool operator<(ItemUniqueId lhs,
Int64 rhs)
76 return lhs.asInt64() < rhs;
79 friend inline bool operator<=(ItemUniqueId lhs, ItemUniqueId rhs)
81 return lhs.asInt64() <= rhs.asInt64();
83 friend inline bool operator<=(
Int64 lhs, ItemUniqueId rhs)
85 return lhs <= rhs.asInt64();
87 friend inline bool operator<=(ItemUniqueId lhs,
Int64 rhs)
89 return lhs.asInt64() <= rhs;
91 friend inline bool operator<=(
Int32 lhs, ItemUniqueId rhs)
93 return lhs <= rhs.asInt64();
95 friend inline bool operator<=(ItemUniqueId lhs,
Int32 rhs)
97 return lhs.asInt64() <= rhs;
100 friend inline bool operator>(ItemUniqueId lhs, ItemUniqueId rhs)
102 return lhs.asInt64() > rhs.asInt64();
104 friend inline bool operator>(
Int64 lhs, ItemUniqueId rhs)
106 return lhs > rhs.asInt64();
108 friend inline bool operator>(ItemUniqueId lhs,
Int64 rhs)
110 return lhs.asInt64() > rhs;
112 friend inline bool operator>(
Int32 lhs, ItemUniqueId rhs)
114 return lhs > rhs.asInt64();
116 friend inline bool operator>(ItemUniqueId lhs,
Int32 rhs)
118 return lhs.asInt64() > rhs;
121 friend inline bool operator>=(ItemUniqueId lhs, ItemUniqueId rhs)
123 return lhs.asInt64() >= rhs.asInt64();
125 friend inline bool operator>=(
Int64 lhs, ItemUniqueId rhs)
127 return lhs >= rhs.asInt64();
129 friend inline bool operator>=(ItemUniqueId lhs,
Int64 rhs)
131 return lhs.asInt64() >= rhs;
133 friend inline bool operator>=(
Int32 lhs, ItemUniqueId rhs)
135 return lhs >= rhs.asInt64();
137 friend inline bool operator>=(ItemUniqueId lhs,
Int32 rhs)
139 return lhs.asInt64() >= rhs;
142 friend inline bool operator!=(ItemUniqueId lhs, ItemUniqueId rhs)
144 return lhs.asInt64() != rhs.asInt64();
146 friend inline bool operator!=(
Int64 lhs, ItemUniqueId rhs)
148 return lhs != rhs.asInt64();
150 friend inline bool operator!=(ItemUniqueId lhs,
Int64 rhs)
152 return lhs.asInt64() != rhs;
154 friend inline bool operator!=(
Int32 lhs, ItemUniqueId rhs)
156 return lhs != rhs.asInt64();
158 friend inline bool operator!=(ItemUniqueId lhs,
Int32 rhs)
160 return lhs.asInt64() != rhs;
163 friend inline bool operator==(ItemUniqueId lhs, ItemUniqueId rhs)
165 return lhs.asInt64() == rhs.asInt64();
167 friend inline bool operator==(
Int64 lhs, ItemUniqueId rhs)
169 return lhs == rhs.asInt64();
171 friend inline bool operator==(ItemUniqueId lhs,
Int64 rhs)
173 return lhs.asInt64() == rhs;
175 friend inline bool operator==(
Int32 lhs, ItemUniqueId rhs)
177 return lhs == rhs.asInt64();
179 friend inline bool operator==(ItemUniqueId lhs,
Int32 rhs)
181 return lhs.asInt64() == rhs;
184 friend ARCANE_CORE_EXPORT std::ostream&
185 operator<<(std::ostream& o,
const ItemUniqueId&);
189 Int64 m_unique_id = NULL_ITEM_ID;