Add missing alGetPointerEXT and alGetPointervEXT
[openal-soft.git] / al / eax / fx_slot_index.h
blob9f350d9b14c87474f0f43f82ffdd63b33bd31b04
1 #ifndef EAX_FX_SLOT_INDEX_INCLUDED
2 #define EAX_FX_SLOT_INDEX_INCLUDED
5 #include <cstddef>
6 #include <optional>
8 #include "api.h"
11 using EaxFxSlotIndexValue = std::size_t;
13 class EaxFxSlotIndex : public std::optional<EaxFxSlotIndexValue> {
14 public:
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);
23 private:
24 [[noreturn]]
25 static void fail(const char *message);
26 }; // EaxFxSlotIndex
28 inline bool operator==(const EaxFxSlotIndex& lhs, const EaxFxSlotIndex& rhs) noexcept
30 if(lhs.has_value() != rhs.has_value())
31 return false;
32 if(lhs.has_value())
33 return *lhs == *rhs;
34 return true;
37 inline bool operator!=(const EaxFxSlotIndex& lhs, const EaxFxSlotIndex& rhs) noexcept
38 { return !(lhs == rhs); }
40 #endif // !EAX_FX_SLOT_INDEX_INCLUDED