remotemono
|
#include <RMonoHandle_Def.h>
Public Types | |
typedef HandleT | HandleType |
typedef RMonoHandle< HandleType, deleter, invalidHandle > | Self |
Public Member Functions | |
RMonoHandle () | |
RMonoHandle (std::nullptr_t) | |
RMonoHandle (HandleType handle, RMonoAPIBase *mono, bool owned) | |
RMonoHandle (const Self &other) | |
RMonoHandle (Self &&other) | |
Self & | operator= (const Self &other) |
Self & | operator= (Self &&other) |
bool | operator== (const Self &other) const |
bool | operator!= (const Self &other) const |
HandleType | operator* () const |
RMonoAPIBase * | getMonoAPI () |
bool | takeOwnership () |
void | reset () |
bool | isValid () const |
bool | isNull () const |
operator bool () const | |
Protected Attributes | |
std::shared_ptr< Data > | d |
A wrapper around a handle in the remote process. RMonoHandle is mostly used to wrap various pointer types to Mono data structures (e.g. MonoAssembly*, MonoImage*). It allows for simple automatic memory management by using shared pointers internally, so that you normally don't have to free resources returned by the Mono API functions. Note that MonoObject* (and derived types like MonoString*, MonoException* etc.) will use the subclass RMonoObjectHandle.
|
inline |
Create an invalid handle (e.g. a null pointer)
|
inline |
Create an invalid handle (e.g. a null pointer)
|
inline |
Main constructor for creating an RMonoHandle from a raw handle (e.g. a raw remote pointer).
handle | The raw remote handle, e.g. a raw remote pointer or a GC handle. |
mono | The Mono API from which the handle originates. |
owned | true if the RMonoHandle should own the remote resources associated with the raw handle. Owning the resources means that the deleter function will be called when the internal shared pointer expires. |
|
inline |
Copy constructor.
|
inline |
Move constructor.
|
inline |
Returns the Mono API that this handle belongs to.
|
inline |
The opposite of isValid().
|
inline |
|
inline |
An alias for isValid().
|
inline |
Returns true if the raw handles of the two RMonoHandle objects are different.
|
inline |
Returns the raw handle.
|
inline |
Assignment operator.
|
inline |
Move-assignment operator.
|
inline |
Returns true if the raw handles of the two RMonoHandle objects are the same.
|
inline |
Resets this RMonoHandle to an invalid handle.
|
inline |
Lets the caller take ownership of the remote resources behind the handle. After calling this method, the caller will be responsible for freeing any associated resources.