Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

GWEInterfaceSimple.h

00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Raphael Langerhorst                             *
00003  *   raphael-langerhorst@gmx.at                                            *
00004  *                                                                         *
00005  *   Permission is hereby granted, free of charge, to any person obtaining *
00006  *   a copy of this software and associated documentation files (the       *
00007  *   "Software"), to deal in the Software without restriction, including   *
00008  *   without limitation the rights to use, copy, modify, merge, publish,   *
00009  *   distribute, sublicense, and/or sell copies of the Software, and to    *
00010  *   permit persons to whom the Software is furnished to do so, subject to *
00011  *   the following conditions:                                             *
00012  *                                                                         *
00013  *   The above copyright notice and this permission notice shall be        *
00014  *   included in all copies or substantial portions of the Software.       *
00015  *                                                                         *
00016  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
00017  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
00018  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
00019  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
00020  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
00021  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
00022  *   OTHER DEALINGS IN THE SOFTWARE.                                       *
00023  ***************************************************************************/
00024 
00025 
00026 #ifndef GWEINTERFACESIMPLEH
00027 #define GWEINTERFACESIMPLEH
00028 
00029 
00030 #include "GWEInterface.h"
00031 
00032 #include <GMatrix44.h>
00033 
00034 #include <qptrlist.h>
00035 #include <qmutex.h>
00036 
00037 
00038 namespace GWE
00039 {
00040 
00055 class GWEInterfaceSimple : public GWEInterface
00056 {
00057   Q_OBJECT
00058   private:
00059   
00065     QPtrList<GCS::GElement> Elements;
00066     
00071     QMutex* ElementListMutex;
00072     
00073   protected:
00074     
00079     GCS::GElement* getElement(const GCS::GElementID& id) const;
00080     
00091     QPtrList<GCS::GElement> findInRange(GCS::GElement* source);
00092     
00093   
00094   public:
00095   
00099     GWEInterfaceSimple();
00100   
00104     virtual ~GWEInterfaceSimple();
00105   
00109     virtual bool add(GCS::GElement*);
00110       
00114     virtual const GCS::GElement* read(const GCS::GElementID&) const;
00115     
00119     virtual GCS::GElement* open(const GCS::GElementID&);
00120     
00124     virtual bool close(GCS::GElement*);
00125     
00129     virtual bool postDelete(GCS::GElement*);
00130     
00131   protected slots:
00132   
00133   // new element registration and element removal //
00134   
00135   // note that the source of these signals are active agents;
00136   
00141     virtual void newElementCreated(GCS::GElement* element);
00142     
00147     virtual void elementRemoved(const GCS::GElementID& ID);
00148     
00157     virtual void elementReparented(GCS::GElement* element, const GCS::GElementID& oldParent, const GCS::GElementID& newParent);
00158     
00159   public slots:
00160         
00161   // INFLUENCE MANAGEMENT //
00162   
00169     virtual void radiateInfluence(GCS::GElementInfluence& influence);
00170     
00174     virtual void routeInfluence(const GCS::GElementID& destination, GCS::GElementInfluence& influence);
00175 };
00176 
00177 }
00178 
00179 #endif

Generated on Thu Oct 21 21:18:03 2004 for G System by doxygen 1.3.6