00001
00009 #pragma once
00010
00011 #include "ManagedObject.h"
00012 #include "WDError.h"
00013
00014 class Chapter;
00015 class Formation;
00016
00025 class FormationRef: public ManagedObject
00026 {
00027 private:
00028 Formation *mFormation;
00029
00030 protected:
00034 WDError updateFormationID();
00035
00036 public:
00037 FormationRef();
00038 ~FormationRef();
00039
00045 WDError initRef(void *inNode, IObjectManager *inManager, IObjectEventHandler *inEventHandler);
00046
00052 WDError initRef(Chapter *inParent, int inIndex, IObjectEventHandler *inEventHandler);
00053
00061 WDError initNew(Chapter *inParent, Formation *inFormation, float inX, float inY , IObjectEventHandler *inEventHandler);
00062
00067 WDError setPosition(float inX, float inY);
00068
00072 WDError setFormation(void *inFormation);
00073
00077 WDError getFormation(void **outFormation);
00078
00083 WDError getFormationName(char *outName, int inMaxLength);
00084
00085
00086 void childChanged(IManagedObject *inTarget, void *inChild);
00087 };