Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

VOS::VobjectEvent Class Reference

This class describes an event changing the state of a Vobject. More...

#include <vos/corelibs/vos/vobject.hh>

Inheritance diagram for VOS::VobjectEvent:

VOS::RefCounted List of all members.

Public Types

Public Member Functions


Detailed Description

This class describes an event changing the state of a Vobject.

This event has either been requested to happen or has already happened, depending respectively on whether it is supplied as part of an access control callback or a listener notification callback.

Note:
A VobjectEvent is a reference counted object. This means that you may keep a reference to an event which has been passed to you if you increment its count with acquire().

Definition at line 49 of file listener.hh.


Member Enumeration Documentation

enum VOS::VobjectEvent::EventType
 

Enumeration values:
TypeInsert 
TypeRemove 
ParentInsert 
ParentRemove 
ChildInsert 
ChildReplace 
ChildRemove 
ReadChild 
ReadParent 
ReadType 
ChildrenListen 
ParentListen 

Definition at line 52 of file listener.hh.


Constructor & Destructor Documentation

VobjectEvent::VobjectEvent EventType  et,
Vobject init,
Vobject fromobj,
int  pos,
const string &  contextname,
Vobject childobj
 

Construct a ReadChild, ReadParent, ChildInserted, ChildRemoved, ParentInserted or ParentRemoved event.

Parameters:
et The type of event that occured
init The object which caused this event to occur
fromobj The parent object involved
pos The position of the child object in question
contextname The contextual name of the child object in question
childobj The child object involved

Definition at line 29 of file listener.cc.

VobjectEvent::VobjectEvent EventType  et,
Vobject init,
Vobject fromobj,
int  pos,
const string &  contextname,
Vobject newobj,
Vobject oldobj
 

Construct a ChildReplaced event.

Parameters:
et The type of event that occured
init The object which caused this event to occur
fromobj The parent object
pos The position of the child object in question
contextname The contextual name of the child object in question
newobject The new child at this position
oldobj The old child at this position

Definition at line 44 of file listener.cc.

VobjectEvent::VobjectEvent EventType  et,
Vobject init,
Vobject fromobject,
const string &  type
 

Construct a ReadType, TypeInserted or TypeRemoved event.

Parameters:
et The type of event that occured
init The object which caused this event to occur
fromobj The parent object of this child change event
type The newly added type string

Definition at line 56 of file listener.cc.

VobjectEvent::VobjectEvent EventType  et,
Vobject requester,
Vobject fromobject
 

Construct a ChildrenListen or ParentListen event.

Parameters:
et The type of event that occured
requester The object which wants to start listening
fromobj The object that will be listened to

Definition at line 64 of file listener.cc.

VobjectEvent::~VobjectEvent  )  [virtual]
 

Definition at line 72 of file listener.cc.


Member Function Documentation

Vobject* VOS::VobjectEvent::getAffectedObject  )  [inline]
 

Returns:
The Vobject which is changing state. Always a valid object. Note that unlike most parts of the API the reference count on the returned object is NOT increased (acquire is NOT called) so if you plan on keeping a reference to it past the lifetime of the callback, you must call acquire yourself! This also means you should NOT assign the returned value to a vRef!

Definition at line 140 of file listener.hh.

Referenced by VOS::RemoteSite::notifyTypeInserted(), and VOS::RemoteSite::notifyTypeRemoved().

Vobject* VOS::VobjectEvent::getChild  )  [inline]
 

Returns:
The child Vobject which was affected on a ParentInsert or ParentRemove event, or the requested object to read on a ReadChild event. Will be NULL for TypeInsert, TypeRemove and all Listen events. Note that unlike most parts of the API the reference count on the returned object is NOT increased (acquire is NOT called) so if you plan on keeping a reference to it past the lifetime of the callback, you must call acquire yourself! This also means you should NOT assign the returned value to a vRef!

Definition at line 151 of file listener.hh.

Referenced by VOS::RemoteSite::notifyChildInserted(), VOS::RemoteSite::notifyChildRemoved(), VOS::RemoteSite::notifyChildReplaced(), VOS::RemoteSite::notifyParentInserted(), and VOS::RemoteSite::notifyParentRemoved().

const string& VOS::VobjectEvent::getContextualName  )  [inline]
 

Returns:
The contextual name of the child Vobject.

Definition at line 179 of file listener.hh.

Referenced by VOS::RemoteSite::notifyChildInserted(), VOS::RemoteSite::notifyChildRemoved(), VOS::RemoteSite::notifyChildReplaced(), VOS::RemoteSite::notifyParentInserted(), and VOS::RemoteSite::notifyParentRemoved().

EventType VOS::VobjectEvent::getEvent  )  [inline]
 

Returns:
What type of event this is.

Definition at line 110 of file listener.hh.

Referenced by VOS::VobjectNotifyEvent::notify().

Vobject* VOS::VobjectEvent::getInitiator  )  [inline]
 

Returns:
The object which requested or initiated this event. Always valid. For access control checks, this is the object which is requesting access. Note that unlike most parts of the API the reference count on the returned object is NOT increased (acquire is NOT called) so if you plan on keeping a reference to it past the lifetime of the callback, you must call acquire yourself! This also means you should NOT assign the returned value to a vRef!

Definition at line 121 of file listener.hh.

Vobject* VOS::VobjectEvent::getNewChild  )  [inline]
 

Returns:
The child Vobject which was newly added on a ChildInsert or ChildReplace event. Will be NULL for ChildRemove, TypeInsert, TypeRemove and all Read and Listen events. Note that unlike most parts of the API the reference count on the returned object is NOT increased (acquire is NOT called) so if you plan on keeping a reference to it past the lifetime of the callback, you must call acquire yourself! This also means you should NOT assign the returned value to a vRef!

Definition at line 162 of file listener.hh.

const string& VOS::VobjectEvent::getNewType  )  [inline]
 

Returns:
The added or removed type for type change events.

Definition at line 182 of file listener.hh.

Referenced by VOS::RemoteSite::notifyTypeInserted(), and VOS::RemoteSite::notifyTypeRemoved().

Vobject* VOS::VobjectEvent::getOldChild  )  [inline]
 

Returns:
The previous Vobject occupying this position. Only valid for ChildRemove and ChildReplace events, NULL otherwise. Note that unlike most parts of the API the reference count on the returned object is NOT increased (acquire is NOT called) so if you plan on keeping a reference to it past the lifetime of the callback, you must call acquire yourself! This also means you should NOT assign the returned value to a vRef!

Definition at line 172 of file listener.hh.

Vobject* VOS::VobjectEvent::getParent  )  [inline]
 

Returns:
The parent Vobject being changed. Always a vaild object. Note that unlike most parts of the API the reference count on the returned object is NOT increased (acquire is NOT called) so if you plan on keeping a reference to it past the lifetime of the callback, you must call acquire yourself! This also means you should NOT assign the returned value to a vRef!

Definition at line 130 of file listener.hh.

Referenced by VOS::RemoteSite::notifyChildInserted(), VOS::RemoteSite::notifyChildRemoved(), VOS::RemoteSite::notifyChildReplaced(), VOS::RemoteSite::notifyParentInserted(), and VOS::RemoteSite::notifyParentRemoved().

int VOS::VobjectEvent::getPosition  )  [inline]
 

Returns:
The absolute position of the child Vobject in parent, or -1 if this is a TypeInserted or TypeRemoved event.

Definition at line 176 of file listener.hh.

Referenced by VOS::RemoteSite::notifyChildInserted(), VOS::RemoteSite::notifyChildRemoved(), VOS::RemoteSite::notifyChildReplaced(), VOS::RemoteSite::notifyParentInserted(), and VOS::RemoteSite::notifyParentRemoved().


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:56:08 2003 for Interreality Project - VOS by doxygen 1.3.2