xml/xmldomandxpath/inc/xmlenginedom/xmlengnode.inl
changeset 0 e35f40988205
equal deleted inserted replaced
-1:000000000000 0:e35f40988205
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Node functions implementation
       
    15 //
       
    16 
       
    17 inline TXmlEngNode::TXmlEngNode()
       
    18         : iInternal(NULL) {}
       
    19 
       
    20 inline TXmlEngNode::TXmlEngNode(void* aInternal)
       
    21         : iInternal(aInternal) {}
       
    22 
       
    23 inline TBool TXmlEngNode::IsNull() const
       
    24     {return iInternal == NULL;}
       
    25 
       
    26 inline TBool TXmlEngNode::NotNull() const
       
    27     {return iInternal != NULL;}
       
    28 
       
    29 // ------------------------------------------------------------------------
       
    30 // Compares nodes.
       
    31 //
       
    32 // The nodes are the same if they are referring to the same in-memory
       
    33 // data structure. 
       
    34 // ------------------------------------------------------------------------
       
    35 //
       
    36 inline TBool TXmlEngNode::IsSameNode(TXmlEngNode aOther) const
       
    37     {return iInternal == aOther.iInternal;}
       
    38 
       
    39 inline TXmlEngNode TXmlEngNode::MoveToL(TXmlEngNode aParent)
       
    40     {return aParent.AppendChildL(Unlink());}
       
    41 
       
    42 inline TXmlEngNode TXmlEngNode::MoveTo(TXmlEngNode aParent)
       
    43     {return aParent.AppendChildL(Unlink());}
       
    44 
       
    45 inline TXmlEngAttr& TXmlEngNode::AsAttr() const                    
       
    46     {return *reinterpret_cast<TXmlEngAttr*>(const_cast<TXmlEngNode*>(this));}
       
    47 
       
    48 inline TXmlEngElement&     TXmlEngNode::AsElement() const                    
       
    49     {return *reinterpret_cast<TXmlEngElement*>(const_cast<TXmlEngNode*>(this));}
       
    50 
       
    51 inline TXmlEngTextNode& TXmlEngNode::AsText() const    
       
    52     {return *reinterpret_cast<TXmlEngTextNode*>(const_cast<TXmlEngNode*>(this));}
       
    53 
       
    54 inline TXmlEngBinaryContainer& TXmlEngNode::AsBinaryContainer() const    
       
    55     {return *reinterpret_cast<TXmlEngBinaryContainer*>(const_cast<TXmlEngNode*>(this));}
       
    56 
       
    57 inline TXmlEngChunkContainer& TXmlEngNode::AsChunkContainer() const    
       
    58     {return *reinterpret_cast<TXmlEngChunkContainer*>(const_cast<TXmlEngNode*>(this));}   
       
    59 
       
    60 inline TXmlEngFileContainer& TXmlEngNode::AsFileContainer() const    
       
    61     {return *reinterpret_cast<TXmlEngFileContainer*>(const_cast<TXmlEngNode*>(this));} 
       
    62 
       
    63 inline TXmlEngDataContainer& TXmlEngNode::AsDataContainer() const    
       
    64     {return *reinterpret_cast<TXmlEngDataContainer*>(const_cast<TXmlEngNode*>(this));}      
       
    65 
       
    66 inline TXmlEngNamespace& TXmlEngNode::AsNamespace() const
       
    67     {return *reinterpret_cast<TXmlEngNamespace*>(const_cast<TXmlEngNode*>(this));}
       
    68 
       
    69 inline TXmlEngComment& TXmlEngNode::AsComment() const        
       
    70     {return *reinterpret_cast<TXmlEngComment*>(const_cast<TXmlEngNode*>(this));}
       
    71 
       
    72 inline TXmlEngCDATASection& TXmlEngNode::AsCDATASection()    const
       
    73     {return *reinterpret_cast<TXmlEngCDATASection*>(const_cast<TXmlEngNode*>(this));}
       
    74 
       
    75 inline TXmlEngEntityReference& TXmlEngNode::AsEntityReference() const
       
    76     {return *reinterpret_cast<TXmlEngEntityReference*>(const_cast<TXmlEngNode*>(this));}
       
    77 
       
    78 inline TXmlEngProcessingInstruction& TXmlEngNode::AsProcessingInstruction() const
       
    79     {return *reinterpret_cast<TXmlEngProcessingInstruction*>(const_cast<TXmlEngNode*>(this));}
       
    80 
       
    81 inline TXmlEngDocumentFragment& TXmlEngNode::AsDocumentFragment() const
       
    82     {return *reinterpret_cast<TXmlEngDocumentFragment*>(const_cast<TXmlEngNode*>(this));}