OWL
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
owl::APIHandle Struct Reference

#include <APIHandle.h>

Public Member Functions

 APIHandle (Object::SP object, APIContext *context)
 
template<typename T >
std::shared_ptr< T > get ()
 
std::shared_ptr< APIContextgetContext () const
 
bool isContext () const
 
std::string toString () const
 
void clear ()
 

Public Attributes

std::shared_ptr< Objectobject
 
std::shared_ptr< APIContextcontext
 

Detailed Description

class that wraps an internal object-sharedptr to a 64-bit 'handle' that is accessible through the C-API, and does the app-side create/release. Handle are owned by an API context, which creates handles and will, upon 'ContextDestroy' release all of them (and of course, release them individually if the app releases them).

Note that the app releasing a handle does not mean that the object itself will be freed at this time; as the objects are themselves internally refcounted by owl.

Member Function Documentation

◆ get()

template<typename T >
std::shared_ptr< T > owl::APIHandle::get
inline

helper functoin that, for a given handle, retrieves a shared-ptr to the obejct referenced by this handle, with automatic type-cast to the expected type, and error handling if this handle does not match the expected type


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