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.
#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);
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 [](long index) const;
void operator+= (long index);
CONCRETE *addr (void) const;
ACE_ALLOC_HOOK_DECLARE;
void dump (void) const;
protected:
long target_;
long base_offset_;
inline ACE_UNIMPLEMENTED_FUNC ( void operator= (const ACE_Based_Pointer_Basic<CONCRETE> &) );
};
inline ACE_UNIMPLEMENTED_FUNC (
void operator= (const ACE_Based_Pointer_Basic<CONCRETE> &)
);
Dietrich.Quehl@med.siemens.de
and
Douglas C. Schmidt schmidt@.cs.wustl.edu