#include <shm_ptr.h>
Inheritance diagram for shm_ptr< T >:
Public Member Functions | |
shm_ptr () | |
shm_ptr (T *rawptr, const shm_segment &seg) | |
T * | get (const shm_segment &seg) const |
long | off (void) |
long | set (long off) |
void | reset (T *rawptr, const shm_segment &seg) |
Private Attributes | |
long | offset |
shm_ptr gives a way to store a pointer in shared memory as an offset from the shared memory segments attached base address.
For now compiler generated copy constructor and assignment are ok.
Definition at line 19 of file shm_ptr.h.
shm_ptr< T >::shm_ptr | ( | T * | rawptr, | |
const shm_segment & | seg | |||
) | [inline] |
T* shm_ptr< T >::get | ( | const shm_segment & | seg | ) | const [inline] |
get a typed pointer to an object given the shared segment
Definition at line 33 of file shm_ptr.h.
Referenced by shm_allocator::alloc(), shm_message::getText(), shm_queue< T >::lock_head(), shm_queue< T >::lock_tail(), main(), shm_queue< T >::pop(), shm_queue< T >::push(), shm_message::setText(), shm_queue< T >::size(), shm_queue< T >::unlock_head(), and shm_queue< T >::unlock_tail().
long shm_ptr< T >::off | ( | void | ) | [inline] |
get the segment offset
primarily for use in comparing shm_ptrs
Definition at line 40 of file shm_ptr.h.
Referenced by shm_queue< T >::pop(), shm_queue< T >::push(), and shm_message::setText().
long shm_ptr< T >::set | ( | long | off | ) | [inline] |
set the segment offset
primarily for use in initializing shm_ptrs
Definition at line 46 of file shm_ptr.h.
Referenced by shm_queue< T >::pop(), and shm_queue_header< T >::shm_queue_header().
void shm_ptr< T >::reset | ( | T * | rawptr, | |
const shm_segment & | seg | |||
) | [inline] |
reset the offset, given a raw pointer and shared segment.
Definition at line 49 of file shm_ptr.h.
Referenced by main(), shm_queue< T >::push(), shm_message::setText(), and shm_queue< T >::shm_queue().
Definition at line 51 of file shm_ptr.h.
Referenced by shm_ptr< shm_allocator::shm_allocator_block >::get(), shm_ptr< shm_allocator::shm_allocator_block >::off(), shm_ptr< shm_allocator::shm_allocator_block >::reset(), shm_ptr< shm_allocator::shm_allocator_block >::set(), and shm_ptr< shm_allocator::shm_allocator_block >::shm_ptr().
Project shmq hosted by
|
Documentation generated on Sat Sep 2 10:07:40 2006 for shmq by
![]() |