26 #ifndef INCLUDED_Interface_h_GUID_5D5B1FAD_AD72_4216_9FB6_6483D6EE7DF1
27 #define INCLUDED_Interface_h_GUID_5D5B1FAD_AD72_4216_9FB6_6483D6EE7DF1
34 #include <osvr/Util/ReportTypesX.h>
37 #include <boost/function.hpp>
47 : m_ctx(&ctx), m_interface(iface) {}
52 return m_ctx != NULL && m_interface != NULL;
68 m_deletables.push_back(obj);
71 #define OSVR_X(TYPE) \
72 inline void Interface::registerCallback(OSVR_##TYPE##Callback cb, \
74 osvrRegister##TYPE##Callback(m_interface, cb, userdata); \
76 OSVR_INVOKE_REPORT_TYPES_XMACRO()
83 #endif // INCLUDED_Interface_h_GUID_5D5B1FAD_AD72_4216_9FB6_6483D6EE7DF1
bool notEmpty() const
Determine if this interface object is empty (that is, was it once initialized). Does not determine if...
Client context object: Create and keep one in your application. Handles lifetime management and provi...
void free()
Manually free the interface before the context is closed.
The main namespace for all C++ elements of the framework, internal and external.
Interface()
Empty constructor.
void free(Interface &iface)
Frees an interface before it would normally be freed (at context close).
Header containing the class declaration for Interface, but not its inline implementation.
OSVR_ClientInterface get()
Get the raw OSVR_ClientInterface from this wrapper.
struct OSVR_ClientInterfaceObject * OSVR_ClientInterface
Opaque handle to an interface used for registering callbacks and getting status.
ClientContext & getContext()
Get the associated ClientContext.
void takeOwnership(util::boost_util::DeletablePtr const &obj)
Take (shared) ownership of some Deletable object.