ACE 8.0.5
Loading...
Searching...
No Matches
ACE_Based_Pointer< CONCRETE > Class Template Reference

A smart proxy that keeps track of the relative offset of a "pointer" from its base address. More...

#include <Based_Pointer_T.h>

Inheritance diagram for ACE_Based_Pointer< CONCRETE >:
Collaboration diagram for ACE_Based_Pointer< CONCRETE >:

Public Member Functions

 ACE_Based_Pointer ()
 ACE_Based_Pointer (CONCRETE *initial)
 ACE_Based_Pointer (const void *base_addr, int dummy)
 ACE_Based_Pointer (const ACE_Based_Pointer &)=delete
 ACE_Based_Pointer (ACE_Based_Pointer &&)=delete
void operator= (const ACE_Based_Pointer &)
void operator= (CONCRETE *from)
 Pseudo-assignment operator.
CONCRETE * operator-> ()
Public Member Functions inherited from ACE_Based_Pointer_Basic< CONCRETE >
 ACE_Based_Pointer_Basic ()
 ACE_Based_Pointer_Basic (CONCRETE *initial)
 ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic &)=delete
 ACE_Based_Pointer_Basic (ACE_Based_Pointer_Basic &&)=delete
 ACE_Based_Pointer_Basic (const void *base_addr, int o)
void operator= (CONCRETE *from)
void operator= (const ACE_Based_Pointer_Basic &)
CONCRETE operator* () const
bool operator< (const ACE_Based_Pointer_Basic &) const
bool operator<= (const ACE_Based_Pointer_Basic &) const
bool operator> (const ACE_Based_Pointer_Basic &) const
bool operator>= (const ACE_Based_Pointer_Basic &) const
bool operator== (const ACE_Based_Pointer_Basic &) const
bool operator!= (const ACE_Based_Pointer_Basic &) const
CONCRETE operator[] (int index) const
void operator+= (int index)
 operator CONCRETE * () const
 Returns the underlying memory address of the smart pointer.
CONCRETE * addr () const
 Returns the underlying memory address of the smart pointer.
void dump () const
 Dump the state of the object.

Additional Inherited Members

Public Attributes inherited from ACE_Based_Pointer_Basic< CONCRETE >
 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
Static Protected Member Functions inherited from ACE_Based_Pointer_Basic< CONCRETE >
static CONCRETE * based (ACE_Based_Pointer_Basic *p)
 Convert input pointer to CONCRETE using the base_offset_ and target_ adjustments.
static CONCRETE constbased (ACE_Based_Pointer_Basic const *p)
 Convert input pointer to CONCRETE using the base_offset_ and target_ adjustments.
Protected Attributes inherited from ACE_Based_Pointer_Basic< CONCRETE >
ptrdiff_t target_
ptrdiff_t base_offset_
 Keep track of our offset from the base pointer.

Detailed Description

template<class CONCRETE>
class ACE_Based_Pointer< CONCRETE >

A smart 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 by overloading the C++ delegation operator ->().

Constructor & Destructor Documentation

◆ ACE_Based_Pointer() [1/5]

template<class CONCRETE>
ACE_Based_Pointer< CONCRETE >::ACE_Based_Pointer ( )

Constructor. See constructor for ACE_Based_Pointer_Basic for details.

◆ ACE_Based_Pointer() [2/5]

template<class CONCRETE>
ACE_Based_Pointer< CONCRETE >::ACE_Based_Pointer ( CONCRETE * initial)

Initialize this object using the <initial> pointer. See constructor for ACE_Based_Pointer_Basic for details.

◆ ACE_Based_Pointer() [3/5]

template<class CONCRETE>
ACE_Based_Pointer< CONCRETE >::ACE_Based_Pointer ( const void * base_addr,
int dummy )

Initialize this object with known base_addr. dummy is a dummy value used to resolve overload ambiguity and it otherwise ignored.

◆ ACE_Based_Pointer() [4/5]

template<class CONCRETE>
ACE_Based_Pointer< CONCRETE >::ACE_Based_Pointer ( const ACE_Based_Pointer< CONCRETE > & )
delete

◆ ACE_Based_Pointer() [5/5]

template<class CONCRETE>
ACE_Based_Pointer< CONCRETE >::ACE_Based_Pointer ( ACE_Based_Pointer< CONCRETE > && )
delete

Member Function Documentation

◆ operator->()

template<class CONCRETE>
CONCRETE * ACE_Based_Pointer< CONCRETE >::operator-> ( )
inline

◆ operator=() [1/2]

template<class CONCRETE>
void ACE_Based_Pointer< CONCRETE >::operator= ( CONCRETE * from)
inline

Pseudo-assignment operator.

◆ operator=() [2/2]

template<class CONCRETE>
void ACE_Based_Pointer< CONCRETE >::operator= ( const ACE_Based_Pointer< CONCRETE > & rhs)
inline

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