25 #ifndef INCLUDED_PluginSpecificRegistrationContext_h_GUID_8C008527_0BF6_408F_3C73_4FE76B77D856
26 #define INCLUDED_PluginSpecificRegistrationContext_h_GUID_8C008527_0BF6_408F_3C73_4FE76B77D856
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;
139 OSVR_PLUGINHOST_EXPORT
void log(util::log::LogLevel severity,
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 util::AnyMap & data()=0
Access the data storage map.
Header providing a templated deleter function.
Class responsible for hosting plugins, along with their registration and destruction.
virtual void registerDriverInstantiationCallback(const char *name, OSVR_DriverInstantiationCallback constructor, void *userData)=0
Register a callback for constructing a driver by name with parameters.
Class providing the external interface of a registration context backing a single plugin...
const std::string & getName() const
Accessor for plugin name.
void(* OSVR_PluginDataDeleteCallback)(void *pluginData)
Function type of a Plugin Data Delete callback.
Header declaring plugin callback types.
Header forward-declaring PluginSpecificRegistrationContext.
Header to bring shared_ptr into the osvr namespace.
A data structure storing "any" by name, to reduce coupling.
virtual ~PluginSpecificRegistrationContext()
Destructor.
Header forward-declaring a concealed implementation class and specifying the smart pointer to hold it...
virtual void registerHardwareDetectCallback(OSVR_HardwareDetectCallback detectCallback, void *userData)=0
Register a callback to be invoked on some hardware detection event.
OSVR_ReturnCode(* OSVR_HardwareDetectCallback)(OSVR_PluginRegContext ctx, void *userData)
Function type of a Hardware Detect callback.
PluginSpecificRegistrationContext(std::string const &name)
Constructor for derived class use only.
Header forward-declaring declaring osvr::util::AnyMap.
void log(util::log::LogLevel severity, const char *message)
Log a message to the plugin-specific channel.
OSVR_PluginRegContext extractOpaquePointer()
Extracts the opaque pointer for this interface to send to C.
OSVR_ReturnCode(* OSVR_DriverInstantiationCallback)(OSVR_PluginRegContext ctx, const char *params, void *userData)
Function type of a driver instantiation callback.
Header declaring the opaque plugin registration context type.
virtual void registerDataWithDeleteCallback(OSVR_PluginDataDeleteCallback deleteCallback, void *pluginData)=0
Register data and a delete callback to be called on plugin unload.
Automatically-generated export header - do not edit!
Header to include for OSVR-internal usage of the logging mechanism: provides the needed definition of...
virtual RegistrationContext & getParent()=0
Get parent registration context.
T * registerDataWithGenericDelete(T *data)
Register data allocated with new to be deleted on plugin unload.
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...
shared_ptr< PluginSpecificRegistrationContextImpl > PluginRegPtr
Pointer with ownership semantics for cleanup of plugins.
static PluginRegPtr create(std::string const &name)
Factory function that creates a plugin-specific registration context. Ownership is transferred to the...
Header forward-declaring RegistrationContext.