00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef XMLI_STACK_H
00011 #define XMLI_STACK_H
00012 #include <stack>
00013
00014 namespace xmli {
00015 template <class T>
00017 class Stack : public std::stack<T> {
00018 public:
00025 static Stack<T>& Instance() {
00026 if (fInstance==0) fInstance = new Stack<T>;
00027 return *fInstance;
00028 }
00029 private:
00030 Stack() { }
00031 static Stack<T>* fInstance;
00032 };
00033 template <class T>
00034 Stack<T>* Stack<T>::fInstance = 0;
00035 }
00036 #endif // XMLISTACK_H
00037