Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Based_Pointer_Basic Class Template Reference

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>`

Inheritance diagram for ACE_Based_Pointer_Basic

[legend]
List of all members.

## Public Methods
| ACE_Based_Pointer_Basic (void)
| ACE_Based_Pointer_Basic (CONCRETE *initial)
| ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic<CONCRETE> &)
| Copy constructor.
| ACE_Based_Pointer_Basic (const void *base_addr, int o)
| Constructor for know base address. <o> is only used to resolve overload ambiguity.
void | operator= (CONCRETE *from)
| Pseudo-assignment operator.
void | operator= (const ACE_Based_Pointer_Basic<CONCRETE> &)
| Pseudo-assignment operator.
CONCRETE | operator * (void) const
| Dereference operator.
int | operator< (const ACE_Based_Pointer_Basic<CONCRETE> &) const
| Less than operator.
int | operator<= (const ACE_Based_Pointer_Basic<CONCRETE> &) const
| Less than or equal operator.
int | operator> (const ACE_Based_Pointer_Basic<CONCRETE> &) const
| Greater than operator.
int | operator>= (const ACE_Based_Pointer_Basic<CONCRETE> &) const
| Greater than or equal operator.
int | operator== (const ACE_Based_Pointer_Basic<CONCRETE> &) const
| Equality operator.
int | operator!= (const ACE_Based_Pointer_Basic<CONCRETE> &) const
| Inequality operator.
CONCRETE | operator[] (int index) const
| Subscript operator.
void | operator+= (int index)
| Increment operator.
| operator CONCRETE * () const
| Returns the underlying memory address of the smart pointer.
CONCRETE* | addr (void) const
| Returns the underlying memory address of the smart pointer.
void | dump (void) const
| Dump the state of the object.
## Public Attributes
| ACE_ALLOC_HOOK_DECLARE
| Declare the dynamic allocation hooks.
## Protected Attributes
long | target_
long | base_offset_
| Keep track of our offset from the base pointer.

## Detailed Description

### template<class CONCRETE> template class ACE_Based_Pointer_Basic

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.

## Constructor & Destructor Documentation

template<classCONCRETE>
ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic<CONCRETE> ( | void )

| This constructor initializes the <base_offset_> by asking the Singleton for the base address of the memory region within which it is instantiated. Two results are possible: 1. An has stored a base address/size pair and the new based-pointer instance is located between the base address and the base address + size - 1. In this case, the repository returns the base address. 2. No suitable address/size pair was found. The repository assumes an address in the regular (not mapped) virtual address space of the process and returns 0. In this case, the based-pointer uses its address as an offset to it's base address 0.

template<classCONCRETE>
ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic<CONCRETE> ( | CONCRETE * initial )

| Initialize this object using the <initial> pointer. This constructor initializes the <base_offset_> by asking the Singleton for the base address of the memory region within which it is instantiated. Three results are possible: 1. An has stored a base address/size pair and the new based-pointer instance is located between the base address and the base address + size - 1. In this case, the repository returns the base address. 2. No suitable address/size pair was found. The repository assumes an address in the regular (not mapped) virtual address space of the process and returns 0. In this case, the based-pointer uses its address as an offset to its base address 0. 3. If <initial> is 0 then set the value of <target_> to -1, which indicates a "NULL" pointer.

template<classCONCRETE>
ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic<CONCRETE> ( | const ACE_Based_Pointer_Basic< CONCRETE >& )

| Copy constructor.

template<classCONCRETE>
ACE_Based_Pointer_Basic<CONCRETE>::ACE_Based_Pointer_Basic<CONCRETE> ( | const void * base_addr,
| int o )

| Constructor for know base address. <o> is only used to resolve overload ambiguity.

## Member Function Documentation

template<classCONCRETE>
ACE_INLINE CONCRETE * ACE_Based_Pointer_Basic< CONCRETE >::addr ( | void ) const

| Returns the underlying memory address of the smart pointer.

template<classCONCRETE>
void ACE_Based_Pointer_Basic<CONCRETE>::dump ( | void ) const

| Dump the state of the object.

template<classCONCRETE>
ACE_INLINE CONCRETE ACE_Based_Pointer_Basic< CONCRETE >::operator * ( | void ) const

| Dereference operator.

template<classCONCRETE>
ACE_INLINE ACE_Based_Pointer_Basic< CONCRETE >::operator CONCRETE * ( | ) const

| Returns the underlying memory address of the smart pointer.

template<classCONCRETE>
ACE_INLINE int ACE_Based_Pointer_Basic< CONCRETE >::operator!= ( | const ACE_Based_Pointer_Basic< CONCRETE >& rhs ) const

| Inequality operator.

template<classCONCRETE>
ACE_INLINE void ACE_Based_Pointer_Basic< CONCRETE >::operator+= ( | int index )

| Increment operator.

template<classCONCRETE>
ACE_INLINE int ACE_Based_Pointer_Basic< CONCRETE >::operator< ( | const ACE_Based_Pointer_Basic< CONCRETE >& rhs ) const

| Less than operator.

template<classCONCRETE>
ACE_INLINE int ACE_Based_Pointer_Basic< CONCRETE >::operator<= ( | const ACE_Based_Pointer_Basic< CONCRETE >& rhs ) const

| Less than or equal operator.

template<classCONCRETE>
ACE_INLINE void ACE_Based_Pointer_Basic< CONCRETE >::operator= ( | const ACE_Based_Pointer_Basic< CONCRETE >& rhs )

| Pseudo-assignment operator.

template<classCONCRETE>
ACE_INLINE void ACE_Based_Pointer_Basic< CONCRETE >::operator= ( | CONCRETE * rhs )

| Pseudo-assignment operator. Reimplemented in ACE_Based_Pointer.

template<classCONCRETE>
ACE_INLINE int ACE_Based_Pointer_Basic< CONCRETE >::operator== ( | const ACE_Based_Pointer_Basic< CONCRETE >& rhs ) const

| Equality operator.

template<classCONCRETE>
ACE_INLINE int ACE_Based_Pointer_Basic< CONCRETE >::operator> ( | const ACE_Based_Pointer_Basic< CONCRETE >& rhs ) const

| Greater than operator.

template<classCONCRETE>
ACE_INLINE int ACE_Based_Pointer_Basic< CONCRETE >::operator>= ( | const ACE_Based_Pointer_Basic< CONCRETE >& rhs ) const

| Greater than or equal operator.

template<classCONCRETE>
ACE_INLINE CONCRETE ACE_Based_Pointer_Basic< CONCRETE >::operator[] ( | int index ) const

| Subscript operator.

## Member Data Documentation

template<classCONCRETE>
ACE_Based_Pointer_Basic<CONCRETE>::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks.

template<classCONCRETE>
long ACE_Based_Pointer_Basic<CONCRETE>::base_offset_`[protected]`

| Keep track of our offset from the base pointer.

template<classCONCRETE>
long ACE_Based_Pointer_Basic<CONCRETE>::target_`[protected]`

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

- Based_Pointer_T.h
- Based_Pointer_T.cpp
- Based_Pointer_T.i