OSVR-Core
Classes | Typedefs | Functions
osvr::pluginhost Namespace Reference

PluginHost functionality: loading, hosting, registering, destroying, and enumerating plugins. More...

Classes

class  PluginSpecificRegistrationContext
 Class providing the external interface of a registration context backing a single plugin. More...
 
class  PluginSpecificRegistrationContextImpl
 Internal class backing the context of registrations performed by a single plugin. More...
 
class  RegistrationContext
 Class responsible for hosting plugins, along with their registration and destruction. More...
 

Typedefs

typedef shared_ptr< PluginSpecificRegistrationContextImplPluginRegPtr
 Pointer with ownership semantics for cleanup of plugins. More...
 
typedef std::vector< std::string > SearchPath
 
typedef std::vector< std::string > FileList
 

Functions

OSVR_PLUGINHOST_EXPORT SearchPath getPluginSearchPath ()
 Find a place where to look for plugins. More...
 
OSVR_PLUGINHOST_EXPORT FileList getAllFilesWithExt (SearchPath const &dirPath, const std::string &ext)
 Get list of files inside the directory with given extension.
 
OSVR_PLUGINHOST_EXPORT std::string findPlugin (SearchPath const &searchPaths, const std::string &pluginName)
 Given the name of a plugin, find the full path to the plugin library. More...
 

Detailed Description

PluginHost functionality: loading, hosting, registering, destroying, and enumerating plugins.

Typedef Documentation

§ PluginRegPtr

Pointer with ownership semantics for cleanup of plugins.

Todo:
why did unique_ptr not work here?

Function Documentation

§ findPlugin()

std::string osvr::pluginhost::findPlugin ( SearchPath const &  searchPaths,
const std::string &  pluginName 
)

Given the name of a plugin, find the full path to the plugin library.

Must be a regular file

Todo:
does this mean symlinks get excluded?

Needs right extension

If the name is right or has the manual load suffix, this is a good one.

Must be a regular file

Todo:
does this mean symlinks get excluded?

Needs right extension

If the name is right or has the manual load suffix, this is a good one.

§ getPluginSearchPath()

SearchPath osvr::pluginhost::getPluginSearchPath ( )

Find a place where to look for plugins.

This will become our return value.

Todo:
add user's home directory to search path

This will become our return value.

Todo:
add user's home directory to search path