OSVR-Core  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::util::BasicKeyedOwnershipContainer< Policy > Class Template Reference

Holds on to smart pointers by value, and lets you free them by providing the corresponding void *. More...

#include <osvr/Util/KeyedOwnershipContainer.h>

Inherits Policy.

Public Member Functions

template<typename T >
void * acquire (T ptr)
 Adds an object held by a smart pointer to our ownership, returning its void * usable to release it before the destruction of this object.
 
bool release (void *ptr)
 Releases the indicated smart pointer in our ownership, if we have it. More...
 

Detailed Description

template<typename Policy = SingleOwnershipPolicy>
class osvr::util::BasicKeyedOwnershipContainer< Policy >

Holds on to smart pointers by value, and lets you free them by providing the corresponding void *.

Definition at line 83 of file KeyedOwnershipContainer.h.

Member Function Documentation

template<typename Policy = SingleOwnershipPolicy>
bool osvr::util::BasicKeyedOwnershipContainer< Policy >::release ( void *  ptr)
inline

Releases the indicated smart pointer in our ownership, if we have it.

Note that this just releases the smart pointer object that we have - the underlying memory may not be freed if your smart pointer is still referenced elsewhere, for instance.

Returns
true if we found it and released it

Definition at line 100 of file KeyedOwnershipContainer.h.


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