25 #ifndef INCLUDED_PluginSpecificRegistrationContext_h_GUID_8C008527_0BF6_408F_3C73_4FE76B77D856 26 #define INCLUDED_PluginSpecificRegistrationContext_h_GUID_8C008527_0BF6_408F_3C73_4FE76B77D856 29 #include <osvr/PluginHost/Export.h> 42 #include <boost/noncopyable.hpp> 48 namespace pluginhost {
64 create(std::string
const &name);
108 static_cast<void *>(data));
133 OSVR_PLUGINHOST_EXPORT
const std::string &
getName()
const;
140 const char *message);
147 std::string
const m_name;
148 osvr::util::log::LoggerPtr m_logger;
154 #endif // INCLUDED_PluginSpecificRegistrationContext_h_GUID_8C008527_0BF6_408F_3C73_4FE76B77D856 virtual OSVR_PLUGINHOST_EXPORT RegistrationContext & getParent()=0
Get parent registration context.
Header providing a templated deleter function.
Class responsible for hosting plugins, along with their registration and destruction.
Definition: RegistrationContext.h:53
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Class providing the external interface of a registration context backing a single plugin...
Definition: PluginSpecificRegistrationContext.h:52
Header declaring plugin callback types.
virtual OSVR_PLUGINHOST_EXPORT void registerHardwareDetectCallback(OSVR_HardwareDetectCallback detectCallback, void *userData)=0
Register a callback to be invoked on some hardware detection event.
Header forward-declaring PluginSpecificRegistrationContext.
Header to bring shared_ptr into the osvr namespace.
virtual OSVR_PLUGINHOST_EXPORT void registerDriverInstantiationCallback(const char *name, OSVR_DriverInstantiationCallback constructor, void *userData)=0
Register a callback for constructing a driver by name with parameters.
virtual OSVR_PLUGINHOST_EXPORT void registerDataWithDeleteCallback(OSVR_PluginDataDeleteCallback deleteCallback, void *pluginData)=0
Register data and a delete callback to be called on plugin unload.
A data structure storing "any" by name, to reduce coupling.
Definition: AnyMap.h:42
virtual OSVR_PLUGINHOST_EXPORT ~PluginSpecificRegistrationContext()
Destructor.
Definition: PluginSpecificRegistrationContext.cpp:39
LogLevel
Log message severity levels.
Definition: LogLevel.h:45
Header forward-declaring a concealed implementation class and specifying the smart pointer to hold it...
void(* OSVR_PluginDataDeleteCallback)(void *pluginData)
Function type of a Plugin Data Delete callback.
Definition: PluginCallbackTypesC.h:48
OSVR_ReturnCode(* OSVR_HardwareDetectCallback)(OSVR_PluginRegContext ctx, void *userData)
Function type of a Hardware Detect callback.
Definition: PluginCallbackTypesC.h:51
PluginSpecificRegistrationContext(std::string const &name)
Constructor for derived class use only.
Definition: PluginSpecificRegistrationContext.cpp:62
Header forward-declaring declaring osvr::util::AnyMap.
OSVR_PLUGINHOST_EXPORT void log(util::log::LogLevel severity, const char *message)
Log a message to the plugin-specific channel.
Definition: PluginSpecificRegistrationContext.cpp:66
OSVR_PLUGINHOST_EXPORT OSVR_PluginRegContext extractOpaquePointer()
Extracts the opaque pointer for this interface to send to C.
Definition: PluginSpecificRegistrationContext.cpp:54
Header declaring the opaque plugin registration context type.
Header to include for OSVR-internal usage of the logging mechanism: provides the needed definition of...
OSVR_PLUGINHOST_EXPORT const std::string & getName() const
Accessor for plugin name.
Definition: PluginSpecificRegistrationContext.cpp:58
T * registerDataWithGenericDelete(T *data)
Register data allocated with new to be deleted on plugin unload.
Definition: PluginSpecificRegistrationContext.h:106
OSVR_ReturnCode(* OSVR_DriverInstantiationCallback)(OSVR_PluginRegContext ctx, const char *params, void *userData)
Function type of a driver instantiation callback.
Definition: PluginCallbackTypesC.h:55
OSVR_EXTERN_C_BEGIN typedef void * OSVR_PluginRegContext
A context pointer passed in to your plugin's entry point and other locations of control flow transfer...
Definition: PluginRegContextC.h:47
shared_ptr< PluginSpecificRegistrationContextImpl > PluginRegPtr
Pointer with ownership semantics for cleanup of plugins.
Definition: PluginRegPtr.h:33
virtual OSVR_PLUGINHOST_EXPORT util::AnyMap & data()=0
Access the data storage map.
static OSVR_PLUGINHOST_EXPORT PluginRegPtr create(std::string const &name)
Factory function that creates a plugin-specific registration context.
Definition: PluginSpecificRegistrationContext.cpp:42
Header forward-declaring RegistrationContext.