memex
Loading...
Searching...
No Matches
RemotePtr< T > Class Template Reference

A class that represents a pointer to a remote memory address. More...

#include <RemotePtr.hpp>

Public Member Functions

 RemotePtr ()=default
 Construct a new Remote Ptr object.
 
 RemotePtr (std::uintptr_t address)
 Construct a new Remote Ptr object, using a raw address.
 
template<typename U >
RemotePtr< U > as ()
 Convert this RemotePtr to a RemotePtr of another type.
 
std::uintptr_t address () const
 Getter for the address.
 
RemotePtr< T > operator+ (std::ptrdiff_t offset) const
 
RemotePtr< T > operator- (std::ptrdiff_t offset) const
 
RemotePtr< T > & operator+= (std::ptrdiff_t offset)
 
RemotePtr< T > & operator-= (std::ptrdiff_t offset)
 
 operator bool () const
 
bool operator== (const RemotePtr< T > &other) const
 
bool operator!= (const RemotePtr< T > &other) const
 
bool operator< (const RemotePtr< T > &other) const
 

Detailed Description

template<typename T>
class RemotePtr< T >

A class that represents a pointer to a remote memory address.

RemotePtr class

Constructor & Destructor Documentation

◆ RemotePtr() [1/2]

template<typename T >
RemotePtr< T >::RemotePtr ( )
default

Construct a new Remote Ptr object.

Here is the caller graph for this function:

◆ RemotePtr() [2/2]

template<typename T >
RemotePtr< T >::RemotePtr ( std::uintptr_t address)
inlineexplicit

Construct a new Remote Ptr object, using a raw address.

Parameters
addressThe address to point to.
Note
This constructor is explicit to prevent implicit conversions from raw addresses to RemotePtr.

Member Function Documentation

◆ address()

template<typename T >
std::uintptr_t RemotePtr< T >::address ( ) const
inline

Getter for the address.

Returns
std::uintptr_t The address of the pointer.
Here is the caller graph for this function:

◆ as()

template<typename T >
template<typename U >
RemotePtr< U > RemotePtr< T >::as ( )
inline

Convert this RemotePtr to a RemotePtr of another type.

Returns
RemotePtr A RemotePtr of the new type, pointing to the same address.
Note
This is a template function to allow conversion to any type.
Here is the call graph for this function:

◆ operator bool()

template<typename T >
RemotePtr< T >::operator bool ( ) const
inlineexplicit

◆ operator!=()

template<typename T >
bool RemotePtr< T >::operator!= ( const RemotePtr< T > & other) const
inline

◆ operator+()

template<typename T >
RemotePtr< T > RemotePtr< T >::operator+ ( std::ptrdiff_t offset) const
inline
Here is the call graph for this function:

◆ operator+=()

template<typename T >
RemotePtr< T > & RemotePtr< T >::operator+= ( std::ptrdiff_t offset)
inline

◆ operator-()

template<typename T >
RemotePtr< T > RemotePtr< T >::operator- ( std::ptrdiff_t offset) const
inline
Here is the call graph for this function:

◆ operator-=()

template<typename T >
RemotePtr< T > & RemotePtr< T >::operator-= ( std::ptrdiff_t offset)
inline

◆ operator<()

template<typename T >
bool RemotePtr< T >::operator< ( const RemotePtr< T > & other) const
inline

◆ operator==()

template<typename T >
bool RemotePtr< T >::operator== ( const RemotePtr< T > & other) const
inline

The documentation for this class was generated from the following file: