1 #ifndef EAX_FX_SLOT_INDEX_INCLUDED
2 #define EAX_FX_SLOT_INDEX_INCLUDED
11 using EaxFxSlotIndexValue
= std::size_t;
13 class EaxFxSlotIndex
: public std::optional
<EaxFxSlotIndexValue
> {
15 using std::optional
<EaxFxSlotIndexValue
>::optional
;
17 EaxFxSlotIndex
& operator=(const EaxFxSlotIndexValue
&value
) { set(value
); return *this; }
18 EaxFxSlotIndex
& operator=(const GUID
&guid
) { set(guid
); return *this; }
20 void set(EaxFxSlotIndexValue index
);
21 void set(const GUID
& guid
);
25 static void fail(const char *message
);
28 inline bool operator==(const EaxFxSlotIndex
& lhs
, const EaxFxSlotIndex
& rhs
) noexcept
30 if(lhs
.has_value() != rhs
.has_value())
37 inline bool operator!=(const EaxFxSlotIndex
& lhs
, const EaxFxSlotIndex
& rhs
) noexcept
38 { return !(lhs
== rhs
); }
40 #endif // !EAX_FX_SLOT_INDEX_INCLUDED