connectivitymodules/SeCon/wbxml/conmlhandler/inc/sconxmlstack.h
branchRCL_3
changeset 20 4a793f564d72
parent 0 d0791faffa3f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/connectivitymodules/SeCon/wbxml/conmlhandler/inc/sconxmlstack.h	Wed Sep 01 12:20:56 2010 +0100
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  ConML parser/generator
+*
+*/
+
+
+#ifndef __SCONXMLSTACK_H__
+#define __SCONXMLSTACK_H__
+
+// -----------------------------------------------------------------------------
+// CNSmlStack - Stack for WBXML / XML elements
+// ----------------------------------------------------------------------------
+
+template <class T>
+class CXMLStack  : public CBase
+	{
+public:
+	static inline CXMLStack* NewL();
+	inline ~CXMLStack();
+        
+        /**
+        *  Removes latest item from the stack
+        * @param none
+        * @return none
+        */
+	inline T* Pop();
+	
+	/**
+        *  Return the latest item from the stack
+        * @param none
+        * @return the item
+        */
+	inline T* Top();
+	
+	/**
+        *  Adds an item to the stack
+        * @param none
+        * @return none
+        */
+	inline void Push( T* aItem );
+	
+	/**
+        * Returns the number of items in the stack
+        * @param none
+        * @return number of items as TInt
+        */
+	inline TInt Count();
+	
+	/**
+        *  Resets the stack
+        * @param none
+        * @return none
+        */
+	inline void Reset();
+	
+	/**
+        *  Resets and destroys the stack
+        * @param none
+        * @return none
+        */
+	inline void ResetAndDestroy();
+
+
+protected:
+	inline CXMLStack<T>();
+
+private:
+	RPointerArray<T>* iStack;
+	};
+
+#include "sconxmlstack.inl"
+
+#endif // __SCONXMLSTACK_H__
\ No newline at end of file