OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::clientkit::Interface Class Reference

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.
 
ClientContextgetContext ()
 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.
 

Detailed Description

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.

Member Function Documentation

void osvr::clientkit::Interface::free ( )
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!

Exceptions
std::logic_errorif the interface is null or already freed.

Definition at line 59 of file Interface.h.


The documentation for this class was generated from the following files: