SharedObjectBase Class Reference#include <SharedObject.h>
Inheritance diagram for SharedObjectBase:
[legend]List of all members.
Detailed Description
It's nice to have a parent class of SharedObject (which is what you probably want to be reading) so that you can pass around the data structure without worrying about what type is inside the shared memory region.
See MotionManager for an example on how to use this.
Definition at line 10 of file SharedObject.h.
|
Public Member Functions |
void * | data () const |
| returns a pointer to the data region
|
RCRegion * | getRegion () const |
| returns the OPEN-R memory region, should you need it
|
Protected Member Functions |
| SharedObjectBase () |
| constructor, protected because you shouldn't need to create this directly, just a common interface to all templates of SharedObject
|
| SharedObjectBase (const SharedObjectBase &sob) |
| copy constructor, adds a reference to the existing region (shallow copy)
|
SharedObjectBase & | operator= (const SharedObjectBase &sob) |
| assignment, adds a reference to the existing region (shallow copy)
|
virtual | ~SharedObjectBase () |
virtual void | removeRef ()=0 |
| removes a reference from rcr, and if necessary, destructs its data
|
Protected Attributes |
RCRegion * | rcr |
| the pointer to the shared memory region this is in charge of
|
Constructor & Destructor Documentation
SharedObjectBase::SharedObjectBase |
( |
|
) |
[inline, protected] |
|
|
constructor, protected because you shouldn't need to create this directly, just a common interface to all templates of SharedObject
Definition at line 17 of file SharedObject.h. |
SharedObjectBase::SharedObjectBase |
( |
const SharedObjectBase & |
sob |
) |
[inline, protected] |
|
|
copy constructor, adds a reference to the existing region (shallow copy)
Definition at line 19 of file SharedObject.h. |
virtual SharedObjectBase::~SharedObjectBase |
( |
|
) |
[inline, protected, virtual] |
|
Member Function Documentation
void* SharedObjectBase::data |
( |
|
) |
const [inline] |
|
RCRegion* SharedObjectBase::getRegion |
( |
|
) |
const [inline] |
|
|
assignment, adds a reference to the existing region (shallow copy)
Definition at line 23 of file SharedObject.h. |
virtual void SharedObjectBase::removeRef |
( |
|
) |
[protected, pure virtual] |
|
|
removes a reference from rcr, and if necessary, destructs its data
Implemented in SharedObject< MC >, SharedObject< LedMC >, SharedObject< WalkMC >, SharedObject< SmallMotionSequenceMC >, SharedObject< MSMC_t >, SharedObject< TailWagMC >, SharedObject< HeadPointerMC >, SharedObject< OldHeadPointerMC >, and SharedObject< UPennWalkMC >.
Referenced by operator=(). |
Member Data Documentation
The documentation for this class was generated from the following file:
|