Interface handle object. Typically acquired from a ClientContext. More...
#include <osvr/ClientKit/Interface_decl.h>
Public Member Functions | |
Interface (ClientContext &ctx, OSVR_ClientInterface iface) | |
Constructs an Interface object from an OSVR_ClientInterface object. | |
Interface () | |
Empty constructor. | |
bool | notEmpty () const |
Determine if this interface object is empty (that is, was it once initialized). Does not determine if it has already been freed (see free()) | |
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).
Definition at line 54 of file Interface_decl.h.
|
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. |
Definition at line 59 of file Interface.h.