NAME

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.

SYNOPSIS

#include <ace/Based_Pointer_T.h>

template<class CONCRETE> class ACE_Based_Pointer_Basic { public: ACE_Based_Pointer_Basic (void); ACE_Based_Pointer_Basic (CONCRETE *initial); ACE_Based_Pointer_Basic ( const ACE_Based_Pointer_Basic<CONCRETE> & ); void operator = (CONCRETE *from); void operator = (const ACE_Based_Pointer_Basic<CONCRETE> &); CONCRETE operator * (void) const; int operator < (const ACE_Based_Pointer_Basic<CONCRETE> &) const; int operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &) const; int operator > (const ACE_Based_Pointer_Basic<CONCRETE> &) const; int operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &) const; int operator == (const ACE_Based_Pointer_Basic<CONCRETE> &) const; int operator != (const ACE_Based_Pointer_Basic<CONCRETE> &) const; CONCRETE operator [](int index) const; void operator+= (int index); operator CONCRETE *() const; CONCRETE *addr (void) const; ACE_ALLOC_HOOK_DECLARE; void dump (void) const; protected: long target_; long base_offset_; };

PUBLIC MEMBERS

ACE_Based_Pointer_Basic (void);

ACE_Based_Pointer_Basic (CONCRETE *initial);

ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic<CONCRETE> &);

void operator = (CONCRETE *from);

void operator = (const ACE_Based_Pointer_Basic<CONCRETE> &);

CONCRETE operator * (void) const;

int operator < (const ACE_Based_Pointer_Basic<CONCRETE> &) const;

int operator <= (const ACE_Based_Pointer_Basic<CONCRETE> &) const;

int operator > (const ACE_Based_Pointer_Basic<CONCRETE> &) const;

int operator >= (const ACE_Based_Pointer_Basic<CONCRETE> &) const;

int operator == (const ACE_Based_Pointer_Basic<CONCRETE> &) const;

int operator != (const ACE_Based_Pointer_Basic<CONCRETE> &) const;

CONCRETE operator [](int index) const;

void operator+= (int index);

operator CONCRETE *() const;

CONCRETE *addr (void) const;

ACE_ALLOC_HOOK_DECLARE;

void dump (void) const;

PROTECTED MEMBERS

long target_;

long base_offset_;

AUTHOR

Dietrich Quehl Dietrich.Quehl@med.siemens.de and Douglas C. Schmidt schmidt@.cs.wustl.edu

LIBRARY

ace