F:/Dev-Cpp/Projects/Events System 1.0 Revision/ComplexElement.hpp

Go to the documentation of this file.
00001 #ifndef _ComplexElement
00002 #define _ComplexElement
00003 
00004 #include <queue>
00005 #include "Element.hpp"
00006 #include "SimpleElement.hpp"
00007 
00008 namespace EventsSystem
00009 {
00010         namespace Interfaces
00011         {
00022                 class ComplexElement : public SimpleElement<false>
00023                 {
00024                 protected:
00025                         std::queue<Element *> qElementsList;
00026                         
00037                         ComplexElement() {}
00038                         
00039                         ComplexElement(const ComplexElement &ceCopy)
00040                         : qElementsList(ceCopy.qElementsList)
00041                         {
00042                         }
00043                         
00050                         virtual ~ComplexElement() {}
00051                 public:
00058                         inline void addComponent(Element *eNewElement) { qElementsList.push(eNewElement); }
00059                         
00066                         inline void removeLastComponent() { qElementsList.pop(); }
00067                         
00078                         Element *getCurrentComponent();
00079                         
00091                         inline Element *getFront() { return qElementsList.front(); }
00092                         
00101                         inline bool isFinished() { return qElementsList.front() == NULL; }
00102                         
00109                         inline void cloneElemenetsQueue(const ComplexElement &ceClone) { qElementsList = ceClone.qElementsList; }
00110                         
00111                         virtual void runComponent() = 0;
00112                 };
00113         }
00114 }
00115 
00116 #endif

Generated on Thu Apr 13 12:15:07 2006 for Events System by  doxygen 1.4.6-NO