connectivitymodules/SeCon/wbxml/conmlhandler/inc/sconxmlstack.h
branchRCL_3
changeset 20 4a793f564d72
parent 0 d0791faffa3f
equal deleted inserted replaced
19:0aa8cc770c8a 20:4a793f564d72
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  ConML parser/generator
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __SCONXMLSTACK_H__
       
    20 #define __SCONXMLSTACK_H__
       
    21 
       
    22 // -----------------------------------------------------------------------------
       
    23 // CNSmlStack - Stack for WBXML / XML elements
       
    24 // ----------------------------------------------------------------------------
       
    25 
       
    26 template <class T>
       
    27 class CXMLStack  : public CBase
       
    28 	{
       
    29 public:
       
    30 	static inline CXMLStack* NewL();
       
    31 	inline ~CXMLStack();
       
    32         
       
    33         /**
       
    34         *  Removes latest item from the stack
       
    35         * @param none
       
    36         * @return none
       
    37         */
       
    38 	inline T* Pop();
       
    39 	
       
    40 	/**
       
    41         *  Return the latest item from the stack
       
    42         * @param none
       
    43         * @return the item
       
    44         */
       
    45 	inline T* Top();
       
    46 	
       
    47 	/**
       
    48         *  Adds an item to the stack
       
    49         * @param none
       
    50         * @return none
       
    51         */
       
    52 	inline void Push( T* aItem );
       
    53 	
       
    54 	/**
       
    55         * Returns the number of items in the stack
       
    56         * @param none
       
    57         * @return number of items as TInt
       
    58         */
       
    59 	inline TInt Count();
       
    60 	
       
    61 	/**
       
    62         *  Resets the stack
       
    63         * @param none
       
    64         * @return none
       
    65         */
       
    66 	inline void Reset();
       
    67 	
       
    68 	/**
       
    69         *  Resets and destroys the stack
       
    70         * @param none
       
    71         * @return none
       
    72         */
       
    73 	inline void ResetAndDestroy();
       
    74 
       
    75 
       
    76 protected:
       
    77 	inline CXMLStack<T>();
       
    78 
       
    79 private:
       
    80 	RPointerArray<T>* iStack;
       
    81 	};
       
    82 
       
    83 #include "sconxmlstack.inl"
       
    84 
       
    85 #endif // __SCONXMLSTACK_H__