This class represents locked memory for read/write memory. More...
#include <ie_locked_memory.hpp>
Public Member Functions | |
LockedMemory (IAllocator *ptr, void *handle, size_t offsetInBytes=0) | |
A constructor. More... | |
LockedMemory (LockedMemory< T > &&)=default | |
A default copy constructor, accepting rvalue. | |
LockedMemory (LockedMemory< T > &&that, size_t offset) | |
A default copy constructor that accepts rvalue. More... | |
LockedMemory (const LockedMemory< T > &)=delete | |
A disabled copy constructor for lvalue. | |
operator T* () | |
Gets a pointer to the stored object. More... | |
operator const T * () const | |
Gets the const pointer to the stored object. More... | |
bool | operator== (const T *pointer) const |
Compares stored object with the given one. More... | |
template<class S , typename = std::enable_if<std::is_pointer<S>::value>> | |
S | as () |
Casts stored object to any provided type. More... | |
template<class S , typename = std::enable_if<std::is_pointer<S>::value>> | |
const S | as () const |
Casts stored object to any provided type. More... | |
Friends | |
bool | operator== (const T *pointer, const LockedMemory< T > &lm) |
Compares the object with the one stored in the memory. More... | |
This class represents locked memory for read/write memory.
|
inline |
A constructor.
ptr | Pointer to IAllocator object |
handle | Handle provided by allocator |
offsetInBytes | Offset in originally locked region |
|
inline |
A default copy constructor that accepts rvalue.
Also sets the offset value for the new memory object
that | Rvalue reference for the other LockedMemoryBase instance |
offset | Offset value |
|
inline |
Casts stored object to any provided type.
Uses reinterpret_cast.
S | Type to be casted to |
|
inline |
Casts stored object to any provided type.
Uses reinterpret_cast.
S | Type to be casted to |
|
inline |
Gets the const pointer to the stored object.
Dereferences from the base class.
|
inline |
Gets a pointer to the stored object.
Dereferences from the base class.
|
inline |
Compares stored object with the given one.
pointer | An pointer to compare with. |
true
if objects are equal, false
otherwise
|
friend |
Compares the object with the one stored in the memory.
pointer | A pointer to compare with |
lm | A compared LockedMemory object |
true
if objects are equal, false
otherwise