epoc32/include/xml/dom/xmlengnodelist.inl
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/xmlengnodelist.inl@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 /*
     2 * Copyright (c) 2006-2006 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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:       Node list inline functions
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 
    22 
    23 
    24 
    25 
    26 // -----------------------------------------------------------------------------
    27 // Retrieves number of items in node list
    28 // -----------------------------------------------------------------------------
    29 //
    30 template<class T> inline TInt RXmlEngNodeList<T>::Count() const
    31     {
    32     return iList.Count();
    33     }
    34     
    35 // -----------------------------------------------------------------------------
    36 // Returns true if this node has next sibling, false otherwise.
    37 // -----------------------------------------------------------------------------
    38 //
    39 template<class T> inline TBool RXmlEngNodeList<T>::HasNext() const
    40     {
    41     return iList.HasNext();
    42     }    
    43 
    44 // -----------------------------------------------------------------------------
    45 // Retrieves next node
    46 // -----------------------------------------------------------------------------
    47 //
    48 template<class T> inline T RXmlEngNodeList<T>::Next()
    49     {
    50     TXmlEngNode t = iList.Next(); 
    51     return *(static_cast<T*>(&t));
    52     }
    53 
    54 // -----------------------------------------------------------------------------
    55 // Closes node list
    56 // -----------------------------------------------------------------------------
    57 //
    58 template<class T> inline void RXmlEngNodeList<T>::Close()
    59     {
    60     iList.Close();
    61     }
    62 
    63 // -----------------------------------------------------------------------------
    64 // Opens node list
    65 // -----------------------------------------------------------------------------
    66 //
    67 template<class T> inline void RXmlEngNodeList<T>::OpenL( 
    68 			void* aHead,
    69 			TXmlEngNode::TXmlEngDOMNodeType aType,
    70 			const TDesC8&	aName,
    71 			const TDesC8&	aNs) 
    72     {
    73     iList.OpenL(aHead, aType, aName, aNs);    
    74     }
    75 
    76 // -----------------------------------------------------------------------------
    77 // Opens node list
    78 // -----------------------------------------------------------------------------
    79 //
    80 template<class T> inline void RXmlEngNodeList<T>::Open( 
    81 			void* aHead,
    82 			TXmlEngNode::TXmlEngDOMNodeType aType)
    83     {
    84     iList.Open(aHead, aType);    
    85     }
    86