Virtual pointer class that provides an interface to access virtual much like 'regular pointers'.
More...
|
| VPtr (NILL_t) |
| Construct from NILL/nullptr (C++11 only)
|
|
|
The following operators are used for accessing the data pointed to by this virtual pointer. The returned value is a proxy class, which mostly acts as the data itself. - See also
- aAccess
|
ValueWrapper | operator* (void) |
|
MemberWrapper | operator-> (void) |
|
const MemberWrapper | operator-> (void) const |
|
const ValueWrapper | operator[] (int i) const |
|
ValueWrapper | operator[] (int i) |
|
|
| operator VPtr< const T, Allocator > (void) |
|
template<typename T2 > |
VIRTMEM_EXPLICIT | operator VPtr< T2, Allocator > (void) |
|
|
These operators can be used for pointer arithmetics.
|
ThisVPtr & | operator+= (int n) |
|
ThisVPtr & | operator++ (void) |
|
ThisVPtr | operator++ (int) |
|
ThisVPtr & | operator-= (int n) |
|
ThisVPtr & | operator-- (void) |
|
ThisVPtr | operator-- (int) |
|
ThisVPtr | operator+ (int n) const |
|
ThisVPtr | operator- (int n) const |
|
int | operator- (const ThisVPtr &other) const |
|
| BaseVPtr (NILL_t) |
| Construct from NILL/nullptr (C++11 only)
|
|
bool | isWrapped (void) const |
| Returns whether a virtual pointer has wrapped a regular pointer (non static version). More...
|
|
PtrNum | getRawNum (void) const |
| Returns a numeric representation of this virtual pointer. More...
|
|
void | setRawNum (PtrNum p) |
| Sets a virtual pointer from a numeric value. More...
|
|
void * | unwrap (const BaseVPtr &p) |
| Provide access to wrapped regular pointer. More...
|
|
void * | unwrap (void) |
| Provide access to wrapped regular pointer (non static version). More...
|
|
const void * | unwrap (void) const |
| Provide access to wrapped regular pointer (non static const version). More...
|
|
template<typename T , typename A > |
VIRTMEM_EXPLICIT | operator VPtr< T, A > (void) const |
| Conversion operator to VPtr types.
|
|
bool | operator== (const BaseVPtr &pb) const |
|
bool | operator!= (const BaseVPtr &pb) const |
|
bool | operator< (const BaseVPtr &pb) const |
|
bool | operator<= (const BaseVPtr &pb) const |
|
bool | operator>= (const BaseVPtr &pb) const |
|
bool | operator> (const BaseVPtr &pb) const |
|
bool | operator== (const NILL_t &) const |
|
bool | operator!= (const NILL_t &) const |
|
| operator TSafeBool (void) const |
| Allows if (myvirtptr) ... expressions.
|
|
template<typename T, typename TA>
class virtmem::VPtr< T, TA >
Virtual pointer class that provides an interface to access virtual much like 'regular pointers'.
This class provides an easy to use interface to access from virtual memory. The class provides functionality such as dereferencing data, array access, memory (de)allocation and pointer arithmetic. This class is designed in such a way that it can be treated mostly as 'plain old data' (POD) and can therefore be used in an union
as well.
- Template Parameters
-
T | The type of the data this pointer points to (e.g. char, int, a struct etc...) |
TA | The allocator type that contains the virtual memory pool where the pointed data resides. |
- See also
- BaseVPtr, TSPIRAMVirtPtr, TSDVirtPtr, TSerRAMVirtPtr, TStaticVPtr and TStdioVirtPtr
- Examples:
- alloc_properties.ino, locking.ino, multispiram_simple.ino, sd_simple.ino, serial_simple.ino, and spiram_simple.ino.