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 Client context object: Create and keep one in your application.
Definition: Context_decl.h:57
void free()
Manually free the interface before the context is closed.
Definition: Interface.h:59
::boost::shared_ptr< Deletable > DeletablePtr
Shared-ownership smart pointer to a Deletable, using Boost's shared pointers.
Definition: BoostDeletable.h:42
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Interface()
Empty constructor.
Definition: Interface.h:49
void free(Interface &iface)
Frees an interface before it would normally be freed (at context close).
Definition: Context.h:104
bool notEmpty() const
Determine if this interface object is empty (that is, was it once initialized).
Definition: Interface.h:51
Header containing the class declaration for Interface, but not its inline implementation.
OSVR_ClientInterface get()
Get the raw OSVR_ClientInterface from this wrapper.
Definition: Interface.h:55
Definition: ClientInterface.h:49
ClientContext & getContext()
Get the associated ClientContext.
Definition: Interface.h:57
void takeOwnership(util::boost_util::DeletablePtr const &obj)
Take (shared) ownership of some Deletable object.
Definition: Interface.h:67