epoc32/include/xmlengnode.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2 * Copyright (c) 2004-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 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 functions implementation
    15 *
    16 */
    17 
    18 
    19 
    20 
    21 
    22 
    23 
    24 inline TXmlEngNode::TXmlEngNode()
    25         : iInternal(NULL) {}
    26 
    27 inline TXmlEngNode::TXmlEngNode(void* aInternal)
    28         : iInternal(aInternal) {}
    29 
    30 inline TBool TXmlEngNode::IsNull() const
    31     {return iInternal == NULL;}
    32 
    33 inline TBool TXmlEngNode::NotNull() const
    34     {return iInternal != NULL;}
    35 
    36 // ------------------------------------------------------------------------
    37 // Compares nodes.
    38 //
    39 // The nodes are the same if they are referring to the same in-memory
    40 // data structure. 
    41 // ------------------------------------------------------------------------
    42 //
    43 inline TBool TXmlEngNode::IsSameNode(TXmlEngNode aOther) const
    44     {return iInternal == aOther.iInternal;}
    45 
    46 // ------------------------------------------------------------------------
    47 // Moves the node to another part of the tree or another document
    48 // The node is unliked from current postion (if any) and appended
    49 // to the its new parent.
    50 //
    51 // @note 
    52 // In many cases this method call should be followed by ReconcileNamespacesL() on the moved node
    53 // ------------------------------------------------------------------------
    54 //
    55 inline TXmlEngNode TXmlEngNode::MoveTo(TXmlEngNode aParent)
    56     {return aParent.AppendChildL(Unlink());}
    57 
    58 inline TXmlEngAttr& TXmlEngNode::AsAttr() const                    
    59     {return *reinterpret_cast<TXmlEngAttr*>(const_cast<TXmlEngNode*>(this));}
    60 
    61 inline TXmlEngElement&     TXmlEngNode::AsElement() const                    
    62     {return *reinterpret_cast<TXmlEngElement*>(const_cast<TXmlEngNode*>(this));}
    63 
    64 inline TXmlEngTextNode& TXmlEngNode::AsText() const    
    65     {return *reinterpret_cast<TXmlEngTextNode*>(const_cast<TXmlEngNode*>(this));}
    66 
    67 inline TXmlEngBinaryContainer& TXmlEngNode::AsBinaryContainer() const    
    68     {return *reinterpret_cast<TXmlEngBinaryContainer*>(const_cast<TXmlEngNode*>(this));}
    69 
    70 inline TXmlEngChunkContainer& TXmlEngNode::AsChunkContainer() const    
    71     {return *reinterpret_cast<TXmlEngChunkContainer*>(const_cast<TXmlEngNode*>(this));}   
    72 
    73 inline TXmlEngFileContainer& TXmlEngNode::AsFileContainer() const    
    74     {return *reinterpret_cast<TXmlEngFileContainer*>(const_cast<TXmlEngNode*>(this));} 
    75 
    76 inline TXmlEngDataContainer& TXmlEngNode::AsDataContainer() const    
    77     {return *reinterpret_cast<TXmlEngDataContainer*>(const_cast<TXmlEngNode*>(this));}      
    78 
    79 inline TXmlEngNamespace& TXmlEngNode::AsNamespace() const
    80     {return *reinterpret_cast<TXmlEngNamespace*>(const_cast<TXmlEngNode*>(this));}
    81 
    82 inline TXmlEngComment& TXmlEngNode::AsComment() const        
    83     {return *reinterpret_cast<TXmlEngComment*>(const_cast<TXmlEngNode*>(this));}
    84 
    85 inline TXmlEngCDATASection& TXmlEngNode::AsCDATASection()    const
    86     {return *reinterpret_cast<TXmlEngCDATASection*>(const_cast<TXmlEngNode*>(this));}
    87 
    88 
    89 inline TXmlEngEntityReference& TXmlEngNode::AsEntityReference() const
    90     {return *reinterpret_cast<TXmlEngEntityReference*>(const_cast<TXmlEngNode*>(this));}
    91 
    92 inline TXmlEngProcessingInstruction& TXmlEngNode::AsProcessingInstruction() const
    93     {return *reinterpret_cast<TXmlEngProcessingInstruction*>(const_cast<TXmlEngNode*>(this));}
    94