00001 00041 #ifndef _STACKIMPL_H 00042 #define _STACKIMPL_H 00043 00044 #include "stack.h" 00045 #include "orderedlist.h" 00046 00047 using std::string; 00048 00049 namespace container { 00050 00054 class StackImpl: public Stack { 00055 public: 00056 00057 const static Info * const TYPE_INFO; 00058 00059 private: 00060 OrderedList * const list; 00061 00062 StackImpl(OrderedList* list); 00063 00064 public: 00065 00066 StackImpl(const StackImpl& orig); 00067 00068 virtual ~StackImpl(); 00069 00070 /********************* StackImpl Methods (public) *********************/ 00071 00072 protected: 00073 00074 /********************* StackImpl Methods (protected) *********************/ 00075 00076 virtual void push_impl(Entity* entity); 00077 00078 virtual Entity * pop_impl(); 00079 00080 public: 00081 00082 /********************* StackImpl Methods (public) *********************/ 00083 00087 static Stack* factoryLinkedComposition(); 00088 00092 static Stack* factoryArrayComposition(); 00093 00094 /********************* Object Methods (public) *********************/ 00095 00096 virtual ostream& renderState(ostream& os) const; 00097 00098 virtual const Info* typeInfo() const; 00099 00100 virtual Object* clone(bool deepCopy = false) const; 00101 00102 }; 00103 00104 } // namespace container 00105 #endif /* _STACKIMPL_H */