ACE
6.3.3
|
A proxy that keeps track of the relative offset of a "pointer" from its base address. This class makes it possible to transparently use "pointers" in shared memory as easily as programming with pointers to local memory. In particular, we don't need to ensure that the base addresses of all the pointers are mapped into separate processes at the same absolute memory base address. More...
#include <Based_Pointer_T.h>
Public Member Functions | |
ACE_Based_Pointer_Basic (void) | |
ACE_Based_Pointer_Basic (CONCRETE *initial) | |
ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic< CONCRETE > &) | |
Copy constructor. More... | |
ACE_Based_Pointer_Basic (const void *base_addr, int o) | |
void | operator= (CONCRETE *from) |
Pseudo-assignment operator. More... | |
void | operator= (const ACE_Based_Pointer_Basic< CONCRETE > &) |
Pseudo-assignment operator. More... | |
CONCRETE | operator* (void) const |
Dereference operator. More... | |
bool | operator< (const ACE_Based_Pointer_Basic< CONCRETE > &) const |
Less than operator. More... | |
bool | operator<= (const ACE_Based_Pointer_Basic< CONCRETE > &) const |
Less than or equal operator. More... | |
bool | operator> (const ACE_Based_Pointer_Basic< CONCRETE > &) const |
Greater than operator. More... | |
bool | operator>= (const ACE_Based_Pointer_Basic< CONCRETE > &) const |
Greater than or equal operator. More... | |
bool | operator== (const ACE_Based_Pointer_Basic< CONCRETE > &) const |
Equality operator. More... | |
bool | operator!= (const ACE_Based_Pointer_Basic< CONCRETE > &) const |
Inequality operator. More... | |
CONCRETE | operator[] (int index) const |
Subscript operator. More... | |
void | operator+= (int index) |
Increment operator. More... | |
operator CONCRETE * () const | |
Returns the underlying memory address of the smart pointer. More... | |
CONCRETE * | addr (void) const |
Returns the underlying memory address of the smart pointer. More... | |
void | dump (void) const |
Dump the state of the object. More... | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. More... | |
Protected Attributes | |
ptrdiff_t | target_ |
ptrdiff_t | base_offset_ |
Keep track of our offset from the base pointer. More... | |
A proxy that keeps track of the relative offset of a "pointer" from its base address. This class makes it possible to transparently use "pointers" in shared memory as easily as programming with pointers to local memory. In particular, we don't need to ensure that the base addresses of all the pointers are mapped into separate processes at the same absolute memory base address.
ACE_Based_Pointer_Basic< CONCRETE >::ACE_Based_Pointer_Basic | ( | void | ) |
This constructor initializes the <base_offset_> by asking the <ACE_BASED_POINTER_REPOSITORY> Singleton for the base address of the memory region within which it is instantiated. Two results are possible:
ACE_Based_Pointer_Basic< CONCRETE >::ACE_Based_Pointer_Basic | ( | CONCRETE * | initial | ) |
Initialize this object using the initial pointer. This constructor initializes the <base_offset_> by asking the <ACE_BASED_POINTER_REPOSITORY> Singleton for the base address of the memory region within which it is instantiated. Three results are possible:
ACE_Based_Pointer_Basic< CONCRETE >::ACE_Based_Pointer_Basic | ( | const ACE_Based_Pointer_Basic< CONCRETE > & | ) |
Copy constructor.
ACE_Based_Pointer_Basic< CONCRETE >::ACE_Based_Pointer_Basic | ( | const void * | base_addr, |
int | o | ||
) |
Constructor for know base address. o is only used to resolve overload ambiguity.
|
inline |
Returns the underlying memory address of the smart pointer.
void ACE_Based_Pointer_Basic< CONCRETE >::dump | ( | void | ) | const |
Dump the state of the object.
|
inline |
Returns the underlying memory address of the smart pointer.
|
inline |
Inequality operator.
|
inline |
Dereference operator.
|
inline |
Increment operator.
|
inline |
Less than operator.
|
inline |
Less than or equal operator.
|
inline |
Pseudo-assignment operator.
|
inline |
Pseudo-assignment operator.
|
inline |
Equality operator.
|
inline |
Greater than operator.
|
inline |
Greater than or equal operator.
|
inline |
Subscript operator.
ACE_Based_Pointer_Basic< CONCRETE >::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
|
protected |
Keep track of our offset from the base pointer.
|
protected |