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

FormationRef Class Reference
[Managed Objects]

FormationRef Class Definition. More...

#include <FormationRef.h>

Inheritance diagram for FormationRef:

Inheritance graph
[legend]
Collaboration diagram for FormationRef:

Collaboration graph
[legend]
List of all members.

Public Methods

 FormationRef ()
 ~FormationRef ()
WDError initRef (void *inNode, IObjectManager *inManager, IObjectEventHandler *inEventHandler)
WDError initRef (Chapter *inParent, int inIndex, IObjectEventHandler *inEventHandler)
WDError initNew (Chapter *inParent, Formation *inFormation, float inX, float inY, IObjectEventHandler *inEventHandler)
WDError setPosition (float inX, float inY)
WDError setFormation (void *inFormation)
WDError getFormation (void **outFormation)
WDError getFormationName (char *outName, int inMaxLength)
void childChanged (IManagedObject *inTarget, void *inChild)

Protected Methods

WDError updateFormationID ()

Private Attributes

FormationmFormation

Detailed Description

FormationRef Class Definition.

An FormationRef is used by the Chapter to reference a Formation (analogous to having an alias to the real Formation or to a soft link. When the Formation is modified, the FormationRef is also notified. Additionally, a FormationRef has a (x,y) position in the Chapter.


Constructor & Destructor Documentation

FormationRef::FormationRef  
 

FormationRef::~FormationRef  
 


Member Function Documentation

void FormationRef::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 FormationRef::getFormation void **    outFormation
 

Returns which Formation is referenced

Parameters:
outFormation  Formation data node which should is referenced

WDError FormationRef::getFormationName char *    outName,
int    inMaxLength
 

Returns the name of the referenced Formation

Parameters:
outName  Name of the referenced formation
inMaxLength  Size of the character buffer

WDError FormationRef::initNew Chapter   inParent,
Formation   inFormation,
float    inX,
float    inY,
IObjectEventHandler   inEventHandler
 

Creates a new FormationRef and adds it to the database

Parameters:
inParent  Chapter in which the FormationRef is to be added
inFormation  Formation which should be referenced
inX  x position
inY  y position
inEventHandler  EventHandler which listens to changes on the data node (can be NULL)

WDError FormationRef::initRef Chapter   inParent,
int    inIndex,
IObjectEventHandler   inEventHandler
 

Initializes an existing FormationRef based on its parent

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

WDError FormationRef::initRef void *    inNode,
IObjectManager   inManager,
IObjectEventHandler   inEventHandler
 

Initializes an existing FormationRef based on data node

Parameters:
inNode  Data node representing the FormationRef
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 FormationRef::setFormation void *    inFormation
 

Sets which Formation should be referenced

Parameters:
inFormation  Formation data node which should be referenced

WDError FormationRef::setPosition float    inX,
float    inY
 

Sets x-y position of the FormationRef in the Chapter

Parameters:
inX  x position
inY  y position

WDError FormationRef::updateFormationID   [protected]
 

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


Member Data Documentation

Formation* FormationRef::mFormation [private]
 


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