00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef GWEINTERFACESIMPLEH
00027 #define GWEINTERFACESIMPLEH
00028
00029
00030 #include <GweController.h>
00031 #include <GDataController.h>
00032
00033 #include <GMatrix44.h>
00034
00035 #include <QMutex>
00036
00037 #include <QList>
00038
00039
00040 namespace GWE
00041 {
00042
00043 class GweSimpleDataController : public GDataController
00044 {
00045 Q_OBJECT
00046 private:
00047
00053 QList<GCS::GElement*> Elements;
00054
00059 QMutex* ElementListMutex;
00060
00061 protected:
00062
00067 GCS::GElement* getElement(const GCS::GElementID& id) const;
00068
00069 public:
00070
00074 GweSimpleDataController();
00075
00079 virtual ~GweSimpleDataController();
00080
00081
00082
00083 virtual const GCS::GElement* read(const GCS::GElementID&) const;
00084
00085 virtual QList<GCS::GElementID> getChildren(const GCS::GElementID& parent) const;
00086
00087 virtual GCS::GElement* open(const GCS::GElementID&);
00088
00089 virtual GCS::GElement* getOpenElement(const GCS::GElementID& );
00090
00091 virtual QList<GCS::GElementID> getListOfOpenElements();
00092
00093 virtual QList<GCS::GElementID> getListOfAllElements();
00094
00095 public slots:
00096
00097 virtual bool add(GCS::GElement* );
00098
00099 virtual bool writeOpenElementToStorage(const GCS::GElementID& );
00100
00101 virtual bool close(const GCS::GElementID& );
00102
00103 virtual bool postDelete(const GCS::GElementID& );
00104
00105 virtual void shutdown();
00106
00107 };
00108
00109
00125 class GweSimpleController : public GweController
00126 {
00127 Q_OBJECT
00128
00129 public:
00130
00134 GweSimpleController();
00135
00139 virtual ~GweSimpleController();
00140
00141 protected slots:
00142
00143
00144
00148 void connectElement(const GCS::GElementID& );
00149
00150
00151
00156 virtual void newElementCreated(GCS::GElement* element);
00157
00162 virtual void elementRemoved(const GCS::GElementID& ID);
00163
00172 virtual void elementReparented(GCS::GElement* element, const GCS::GElementID& oldParent, const GCS::GElementID& newParent);
00173
00174
00175 public slots:
00176
00177
00178
00184
00185
00189
00190 };
00191
00192 }
00193
00194 #endif