ReXGlue SDK
Loading...
Searching...
No Matches
driver_module.h
Go to the documentation of this file.
1
10
11#pragma once
12
13#include <memory>
14#include <span>
15#include <string>
16#include <string_view>
17#include <vector>
18
19#include <rex/driver.h>
21#include <rex/module.h>
22#include <rex/result.h>
23
24namespace rex {
25
26class IDriverContext;
27
33 virtual std::span<const DriverRegistration> GetDrivers() const = 0;
34};
35
44[[nodiscard]] REX_API std::vector<std::string> GetDriverModules(
45 DriverType type, std::string_view names, GraphicsFamily family = GraphicsFamily::kNone,
46 IInterfaceFactory* connected = nullptr);
47
57[[nodiscard]] REX_API Result<std::vector<std::unique_ptr<IDriver>>> SelectDrivers(
58 IInterfaceFactory& factory, DriverType type, std::string_view names, IDriverContext& context);
59
60} // namespace rex
Definition driver_context.h:23
Definition driver_module.h:32
Definition driver.h:41
Definition module.h:131
Interfaces, factory and module declaration.
#define REX_DECLARE_INTERFACE(Name, version)
Definition module.h:114
Definition app.h:36
DriverType
Definition driver.h:33
Result< std::vector< std::unique_ptr< IDriver > > > SelectDrivers(IInterfaceFactory &factory, DriverType type, std::string_view names, IDriverContext &context)
GraphicsFamily
Definition driver.h:25
std::vector< std::string > GetDriverModules(DriverType type, std::string_view names, GraphicsFamily family=GraphicsFamily::kNone, IInterfaceFactory *connected=nullptr)
std::expected< T, Error > Result
Definition result.h:98
#define REX_API
Definition platform.h:177
Definition driver_registration.h:20