00001
00009 #pragma once
00010 #pragma warning(disable: 4786)
00011
00012 #include "IObjectManager.h"
00013 #include <list>
00014 using namespace std;
00015 #include "WDError.h"
00016
00017 class SubscriberMap;
00018
00026 class ObjectManager: public IObjectManager
00027 {
00028 private:
00029 SubscriberMap *mSubscriberMap;
00030 void *mRoot;
00031 list<IManagedObject*> mNodes;
00035 public:
00036 ObjectManager();
00037 ~ObjectManager();
00038
00039
00043 WDError initRef(const char *inFile);
00044
00049 WDError initNew(const char *inRootType, const char *inDTD);
00050
00051
00052 public:
00053 void release(IManagedObject *inObject);
00054 void* getChild(void *inNode, int inIndex);
00055 void getType(void *inNode, char *outType, int inMaxLength);
00056 WDError setAttribute(void *inNode, const char *inAttribute, const char *inValue);
00057 WDError saveToFile(const char *inFileName);
00058 WDError getAttribute(void *inNode, const char *inAttribute, char *outValue, int inMaxLength);
00059 void* newChildNode(const char *inType, void *inParent);
00060 int getChildCount(void *inNode);
00061 void* getParentNode(void *inNode);
00062 WDError subscribe(IManagedObject *inObject, void *inTargetNode);
00063 void* findNode(const char *nodeID, void *inRoot);
00064 int getIndex(void *inNode);
00065 void registerObject(void *inObject);
00066 void* getRoot();
00067
00068
00069 void notifyChanged(void *inNode);
00070 void notifyChildAdded(void *inStartNode, void *inChildNode);
00071 void notifyChildChanged(void *inStartNode, void *inChildNode);
00072 };