#include <shark/Core/utility/ScopedHandle.h>
Public Types | |
typedef boost::function< void(const T &) > | DeleterType |
The typedef of deleter for type a T. More... | |
typedef boost::function< bool(const T &) > | VerifierType |
Type of verifier which should return true for valid handle, and false otherwise. More... | |
Public Member Functions | |
ScopedHandle (const T &handle, const DeleterType &deleter, const std::string &handleDescription="") | |
~ScopedHandle () | |
const T & | operator* () const |
The only way to access handle externally. More... | |
A handle container which usually taking C style handle such as file Id
T | The type of handle the container holds |
Definition at line 57 of file ScopedHandle.h.
typedef boost::function<void (const T&) > shark::ScopedHandle< T >::DeleterType |
The typedef of deleter for type a T.
Definition at line 62 of file ScopedHandle.h.
typedef boost::function<bool (const T&) > shark::ScopedHandle< T >::VerifierType |
Type of verifier which should return true for valid handle, and false otherwise.
Definition at line 65 of file ScopedHandle.h.
|
inline |
Constructor
handle | The handle container will hold |
deleter | The deleter used for freeing a handle which should return true for valid handles, false otherwise |
handleDescription | A description of handle for easy debugging in case of validation failure |
Definition at line 74 of file ScopedHandle.h.
References SHARKEXCEPTION.
|
inline |
Definition at line 88 of file ScopedHandle.h.
|
inline |
The only way to access handle externally.
Definition at line 95 of file ScopedHandle.h.