This class is for <void*> data and allows casting to any pointers. More...
#include <ie_locked_memory.hpp>
Public Member Functions | |
LockedMemory (IAllocator *ptr, void *handle, size_t offsetInBytes) | |
A constructor. More... | |
LockedMemory (LockedMemory< void > &&)=default | |
A default copy constructor that accepts rvalue. | |
LockedMemory (LockedMemory< void > &&that, size_t offset) | |
A default copy constructor that accepts rvalue. More... | |
LockedMemory (const LockedMemory< void > &)=delete | |
A disabled copy constructor for lvalue. | |
template<class S > | |
operator S* () | |
Gets the pointer to the stored object of the given template type. More... | |
bool | operator== (const void *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 given type. More... | |
template<class S , typename = std::enable_if<std::is_pointer<S>::value>> | |
const S | as () const |
Casts stored object to any given type. More... | |
Friends | |
bool | operator== (const void *pointer, const LockedMemory< void > &lm) |
Compares the object with the one stored in the memory. More... | |
This class is for <void*> data and allows casting to any pointers.
|
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 given type.
Uses reinterpret_cast.
S | Type to be casted to |
|
inline |
Casts stored object to any given type.
Uses reinterpret_cast.
S | Type to be casted to |
|
inline |
Gets the pointer to the stored object of the given template type.
Dereferences from the base class.
S | Type to be casted to |
|
inline |
Compares stored object with the given one.
|
friend |
Compares the object with the one stored in the memory.