1 #ifndef EAX_FX_SLOT_INDEX_INCLUDED
2 #define EAX_FX_SLOT_INDEX_INCLUDED
7 #include "aloptional.h"
11 using EaxFxSlotIndexValue = std::size_t;
13 class EaxFxSlotIndex : public al::optional<EaxFxSlotIndexValue>
16 using al::optional<EaxFxSlotIndexValue>::optional;
18 EaxFxSlotIndex& operator=(const EaxFxSlotIndexValue &value) { set(value); return *this; }
19 EaxFxSlotIndex& operator=(const GUID &guid) { set(guid); return *this; }
21 void set(EaxFxSlotIndexValue index);
22 void set(const GUID& guid);
26 static void fail(const char *message);
29 inline bool operator==(const EaxFxSlotIndex& lhs, const EaxFxSlotIndex& rhs) noexcept
31 if(lhs.has_value() != rhs.has_value())
38 inline bool operator!=(const EaxFxSlotIndex& lhs, const EaxFxSlotIndex& rhs) noexcept
39 { return !(lhs == rhs); }
41 #endif // !EAX_FX_SLOT_INDEX_INCLUDED