1 #ifndef XT_API_PLATFORM_HPP
2 #define XT_API_PLATFORM_HPP
6 #include <xt/cpp/Core.hpp>
7 #include <xt/cpp/Error.hpp>
28 std::vector<System> GetSystems();
30 std::unique_ptr<Service> GetService(
System system);
35 { Detail::HandleDestroy(XtPlatformDestroy, _p); }
37 inline std::vector<System>
41 Detail::HandleAssert(XtPlatformGetSystems, _p,
nullptr, &size);
42 std::vector<System> result(static_cast<size_t>(size));
43 auto coreSystems =
reinterpret_cast<XtSystem*
>(result.data());
44 Detail::HandleAssert(XtPlatformGetSystems, _p, coreSystems, &size);
51 auto coreSetup =
static_cast<XtSetup
>(setup);
52 auto result = Detail::HandleAssert(XtPlatformSetupToSystem(_p, coreSetup));
53 return static_cast<System>(result);
56 inline std::unique_ptr<Service>
59 auto coreSystem =
static_cast<XtSystem
>(system);
60 XtService
const* service = Detail::HandleAssert(XtPlatformGetService(_p, coreSystem));
61 if(!service)
return std::unique_ptr<Service>();
62 return std::unique_ptr<Service>(
new Service(service));
66 #endif // XT_API_PLATFORM_HPP
Definition: XtAudio.hpp:21
Definition: Callbacks.hpp:10
Setup
Definition: Enums.hpp:8
System
Definition: Enums.hpp:11