diff -r 0aa8cc770c8a -r 4a793f564d72 connectivitymodules/SeCon/wbxml/conmlhandler/inc/sconxmlstack.h --- /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 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(); + +private: + RPointerArray* iStack; + }; + +#include "sconxmlstack.inl" + +#endif // __SCONXMLSTACK_H__ \ No newline at end of file