Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

ActorRef Class Reference
[Managed Objects]

ActorRef Class Definition. More...

#include <ActorRef.h>

Inheritance diagram for ActorRef:

Inheritance graph
[legend]
Collaboration diagram for ActorRef:

Collaboration graph
[legend]
List of all members.

Public Methods

 ActorRef ()
 ~ActorRef ()
WDError initRef (void *inNode, IObjectManager *inManager, IObjectEventHandler *inEventHandler)
WDError initRef (Formation *inParent, int inIndex, IObjectEventHandler *inEventHandler)
WDError initNew (Formation *inParent, Actor *inActor, IObjectEventHandler *inEventHandler)
WDError setActor (void *inActor)
WDError getActor (void **outActorNode)
WDError getActorName (char *outActorName, int inMaxLength)
void childChanged (IManagedObject *inTarget, void *inChild)

Protected Methods

WDError updateActorID ()

Private Attributes

Actor * mActor

Detailed Description

ActorRef Class Definition.

An ActorRef is used by the Formation to reference Actors (analogous to having an alias to the real Actor or to a soft link. When the Actor is modified, the ActorRef is also notified.


Constructor & Destructor Documentation

ActorRef::ActorRef (    ) 
 

ActorRef::~ActorRef (    ) 
 


Member Function Documentation

void ActorRef::childChanged (  IManagedObject *    inTarget,
void *    inChild
)  [virtual]
 

Called when a child of the data node has been modified

Parameters:
inTarget  IManagedObject which was subscribed to the data node
inChild  Data node of the child which has changed

Reimplemented from ManagedObject.

WDError ActorRef::getActor (  void **    outActorNode ) 
 

Gets the data node of the referenced Actor

Parameters:
outActorNode  Actor which should be referenced

WDError ActorRef::getActorName (  char *    outActorName,
int    inMaxLength
) 
 

Gets the name of the referenced Actor

Parameters:
outActorName  name of the Actor
inMaxLength  size of the char buffer

WDError ActorRef::initNew (  Formation *    inParent,
Actor *    inActor,
IObjectEventHandler *    inEventHandler
) 
 

Creates a new ActorRef and adds it to the database

Parameters:
inParent  Formation in which the ActorRef is to be added
inActor  Actor which should be referenced
inEventHandler  EventHandler which listens to changes on the data node (can be NULL)

WDError ActorRef::initRef (  Formation *    inParent,
int    inIndex,
IObjectEventHandler *    inEventHandler
) 
 

Initializes an existing ActorRef based on its parent

Parameters:
inParent  Formation in which the ActorRef is
inIndex  Index of the ActorRef in the Formation
inEventHandler  EventHandler which listens to changes on the data node (can be NULL)

WDError ActorRef::initRef (  void *    inNode,
IObjectManager *    inManager,
IObjectEventHandler *    inEventHandler
) 
 

Initializes an existing ActorRef based on data node

Parameters:
inNode  Data node representing the ActorRef
inManager  Database from which the data node was taken
inEventHandler  EventHandler which listens to changes on the data node (can be NULL)

Reimplemented from ManagedObject.

WDError ActorRef::setActor (  void *    inActor ) 
 

Sets which Actor should be referenced

Parameters:
inActor  Actor data node which should be referenced

WDError ActorRef::updateActorID (    )  [protected]
 

Updates the actor attribute in the database - used when the ID of the referenced Actor has changed.


Member Data Documentation

Actor* ActorRef::mActor [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Apr 15 15:23:11 2002 for WhiteDwarf by doxygen1.2.15