interreality.org [VOS]
[Home] [About]
[Screenshots]
[Download]
[News]
[Community]
[Documentation] [Manual]
[Bugs & Requests] [Wiki]

VOS::VobjectEvent Class Reference
[libvos]

#include <vos/vos/vobjectevent.hh>

Inheritance diagram for VOS::VobjectEvent:

VUtil::RefCounted List of all members.

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() and/or use vRef<>.

Definition at line 54 of file vobjectevent.hh.

Public Types

Public Member Functions


Member Enumeration Documentation

Enumerator:
TypeInsert 
TypeRemove 
ParentInsert 
ParentRemove 
ChildInsert 
ChildReplace 
ChildRemove 
ReadChild 
ReadParent 
ReadType 
ChildrenListen 
ParentListen 
TypeListen 
ReadACL 
AddToACL 
RemoveFromACL 
DeleteACL 
SetDefaultPolicy 

Definition at line 57 of file vobjectevent.hh.


Constructor & Destructor Documentation

VOS::VobjectEvent::VobjectEvent ( EventType  et,
Vobject init,
Vobject fromobj,
int  pos,
const std::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

VOS::VobjectEvent::VobjectEvent ( EventType  et,
Vobject init,
Vobject fromobj,
int  pos,
const std::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
newobj The new child at this position
oldobj The old child at this position

VOS::VobjectEvent::VobjectEvent ( EventType  et,
Vobject init,
Vobject fromobj,
const std::string &  str 
)

Construct a ReadType, TypeInserted, TypeRemoved or RemoveACL 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
str The newly added type string for Type events, or the ACL for RemoveACL event

VOS::VobjectEvent::VobjectEvent ( EventType  et,
Vobject requester,
Vobject fromobj 
)

Construct a ChildrenListen, ParentListen TypeListen or ReadACL event.

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

VOS::VobjectEvent::VobjectEvent ( EventType  et,
Vobject requester,
Vobject fromobj,
const std::string &  acl,
Vobject aclmember 
)

Construct an AddToACL or RemoveFromACL event.

Parameters:
et The type of event that occured
requester The object which wants to make the change
fromobj the object on which the security is changing
acl the access control list to change
aclmember The identity or group that will be added or removed from the ACL

virtual VOS::VobjectEvent::~VobjectEvent (  )  [virtual]


Member Function Documentation

void VOS::VobjectEvent::deliverTo ( ParentChangeListener ccl  ) 

void VOS::VobjectEvent::deliverTo ( TypeChangeListener ccl  ) 

void VOS::VobjectEvent::deliverTo ( ChildChangeListener ccl  ) 

VUtil::vRef<Vobject> VOS::VobjectEvent::getACLMember (  )  [inline]

Returns:
The identity or group to be added or removed on a AddToACL or RemoveFromACL event.

Definition at line 154 of file vobjectevent.hh.

const std::string& VOS::VobjectEvent::getAffectedACL (  )  [inline]

Returns:
The access control list being changed..

Definition at line 182 of file vobjectevent.hh.

VUtil::vRef<Vobject> VOS::VobjectEvent::getAffectedObject (  )  [inline]

Returns:
The Vobject which is changing state. Always a valid object.

Definition at line 144 of file vobjectevent.hh.

VUtil::vRef<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.

Definition at line 150 of file vobjectevent.hh.

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

Returns:
The contextual name of the child Vobject.

Definition at line 172 of file vobjectevent.hh.

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

Returns:
What type of event this is.

Definition at line 129 of file vobjectevent.hh.

VUtil::vRef<Vobject> VOS::VobjectEvent::getInitiator (  )  [inline]

Returns:
The object which requested or initiated this event. May be null. For access control checks, this is the object which is requesting access.

Definition at line 135 of file vobjectevent.hh.

VUtil::vRef<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.

Definition at line 160 of file vobjectevent.hh.

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

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

Definition at line 175 of file vobjectevent.hh.

VUtil::vRef<Vobject> VOS::VobjectEvent::getOldChild (  )  [inline]

Returns:
The previous Vobject occupying this position. Only valid for ChildRemove and ChildReplace events, NULL otherwise.

Definition at line 165 of file vobjectevent.hh.

const std::string& VOS::VobjectEvent::getOldType (  )  [inline]

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

Definition at line 179 of file vobjectevent.hh.

VUtil::vRef<Vobject> VOS::VobjectEvent::getParent (  )  [inline]

Returns:
The parent Vobject being changed. Always a vaild object.

Definition at line 139 of file vobjectevent.hh.

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 169 of file vobjectevent.hh.

const std::string& VOS::VobjectEvent::getType (  )  [inline]

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

Definition at line 177 of file vobjectevent.hh.


The documentation for this class was generated from the following file: