17class DtDynamicLibrary;
140 std::unique_ptr<DtVrePlugin>
plugin =
nullptr;
178 const std::vector<PluginInfo>&
plugins()
const;
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:155
virtual bool isValid() const
Returns whether the underlying dynamic library loaded successfully.
virtual void init()
Resolves the plugin entry points.
virtual bool hasValidEntryPoints() const
Returns whether the underlying dynamic library loaded successfully.
DtDynamicLibrary * myDynamicLibrary
The dynamic-library loader for this plugin.
Definition vrePluginManager.h:102
virtual bool postInitializePlugin(DtPlayerStationApp *app)
Calls the plugin post-init entry point when available.
DtVrePlugin(const std::string &libName)
Constructs a plugin wrapper for the specified library.
InitPlayerStationDllFunction myInitFunc
The required plugin init entry point.
Definition vrePluginManager.h:108
std::string myLibraryName
The original library name used to load the plugin.
Definition vrePluginManager.h:105
ShutdownPlayerStationDllFunction myShutdownFunc
The optional plugin shutdown entry point.
Definition vrePluginManager.h:114
virtual bool hasShutdown() const
Returns whether the plugin exposes the optional shutdown entry point.
virtual bool initializePlugin(DtPlayerStationApp *app)
Calls the plugin init entry point.
PostInitPlayerStationDllFunction myPostInitFunc
The optional plugin post-init entry point.
Definition vrePluginManager.h:111
virtual std::string libraryName() const
Returns the original plugin library name.
virtual bool hasInit() const
Returns whether the plugin exposes the required init entry point.
virtual bool hasPostInit() const
Returns whether the plugin exposes the optional post-init entry point.
virtual void shutdownPlugin(DtPlayerStationApp *app)
Calls the plugin shutdown entry point when available.
virtual ~DtVrePlugin()
Destroys the plugin wrapper without unloading recognized plugin libraries.
virtual void shutdownPlugins()
Calls the shutdown entry point on all loaded plugins in load order.
std::string myPluginDirectory
Full path to the directory scanned by discoverPlugins().
Definition vrePluginManager.h:197
virtual bool loadPlugin(const std::string &filename)
Loads a single plugin by path if it has not already been loaded.
virtual void initializePlugins()
Calls the init entry point on all plugins that have been successfully loaded.
std::vector< PluginInfo > myPlugins
Ordered list of all plugins discovered or explicitly loaded.
Definition vrePluginManager.h:194
virtual ~DtVrePluginManager()
Destroys the manager and its plugin wrappers.
DtVrePluginManager(DtVrePluginManager &&)=default
DtVrePluginManager()
Constructs an empty plugin manager.
DtPlayerStationApp * myApp
Non-owning pointer to the player-station application.
Definition vrePluginManager.h:203
DtVrePluginManager & operator=(const DtVrePluginManager &)=delete
DtVrePluginManager & operator=(DtVrePluginManager &&)=default
virtual void initialize(DtPlayerStationApp *app)
Stores the player-station application pointer for later use by plugin entry points.
const std::vector< PluginInfo > & plugins() const
Returns the list of all discovered plugins in load order.
virtual void postInitializePlugins()
Calls the post-init entry point on all loaded plugins in load order.
virtual void setPluginDirectory(const std::string &directory)
Sets the directory path that discoverPlugins() will scan.
virtual void discoverPlugins()
Scans the configured plugin directory for DLL files and loads each one.
virtual std::string pluginDirectory() const
Returns the plugin directory path.
DtVrePluginManager(const DtVrePluginManager &)=delete
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
!
Definition glsVreMessageUtil.h:50
constexpr const char * DtVreShutdownPluginFunction
Symbol name of the optional plugin shutdown entry point.
Definition vrePluginManager.h:40
bool(*)(DtPlayerStationApp *app) PostInitPlayerStationDllFunction
Function pointer type for plugin post-initialization.
Definition vrePluginManager.h:28
bool(*)(DtPlayerStationApp *app) InitPlayerStationDllFunction
Function pointer type for plugin initialization.
Definition vrePluginManager.h:25
void(*)(DtPlayerStationApp *app) ShutdownPlayerStationDllFunction
Function pointer type for plugin shutdown.
Definition vrePluginManager.h:31
constexpr const char * DtVreInitPluginFunction
Symbol name of the required plugin initialization entry point.
Definition vrePluginManager.h:34
constexpr const char * DtVrePostInitPluginFunction
Symbol name of the optional plugin post-initialization entry point.
Definition vrePluginManager.h:37
Aggregates metadata and ownership for a single discovered plugin.
Definition vrePluginManager.h:123
bool hasInit
True if the plugin exposes the init entry point.
Definition vrePluginManager.h:131
std::string name
Short filename of the plugin without directory component.
Definition vrePluginManager.h:125
bool hasPostInit
True if the plugin exposes the post-init entry point.
Definition vrePluginManager.h:134
std::unique_ptr< DtVrePlugin > plugin
Owning handle for the loaded plugin, or nullptr if load failed.
Definition vrePluginManager.h:140
bool hasShutdown
True if the plugin exposes the shutdown entry point.
Definition vrePluginManager.h:137
std::string fullPath
Full path used to load the plugin.
Definition vrePluginManager.h:128