OSVR-Core
|
Interface handle object. More...
#include <Interface_decl.h>
Public Member Functions | |
Interface (ClientContext &ctx, OSVR_ClientInterface iface) | |
Constructs an Interface object from an OSVR_ClientInterface object. More... | |
Interface () | |
Empty constructor. | |
bool | notEmpty () const |
Determine if this interface object is empty (that is, was it once initialized). More... | |
OSVR_ClientInterface | get () |
Get the raw OSVR_ClientInterface from this wrapper. | |
ClientContext & | getContext () |
Get the associated ClientContext. | |
void | free () |
Manually free the interface before the context is closed. More... | |
void | takeOwnership (util::boost_util::DeletablePtr const &obj) |
Take (shared) ownership of some Deletable object. | |
Interface handle object.
Typically acquired from a ClientContext.
May be freely passed around and copied, as it does not confer ownership in the underlying interface object - that is maintained by the ClientContext. You may request, however, that ClientContext destroy the underlying interface object before it normally would (at context destruction).
|
inline |
Constructs an Interface object from an OSVR_ClientInterface object.
|
inline |
Manually free the interface before the context is closed.
This is not required, but can be used, for instance, to ensure that a callback is not called with a reference to an already-deleted object.
This will make use of this and any other copies of this Interface object illegal!
std::logic_error | if the interface is null or already freed. |
|
inline |
Determine if this interface object is empty (that is, was it once initialized).
Does not determine if it has already been freed (see free())