epoc32/include/xml/dom/xmlengnode.inl
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 /*
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). 
     2 // All rights reserved.
     3 * All rights reserved.
     3 // This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     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
     5 // which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 *
     8 // Initial Contributors:
     9 * Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    10 //
    11 *
    11 // Contributors:
    12 * Contributors:
    12 //
    13 *
    13 // Description:
    14 * Description:       Node functions implementation
    14 // Node functions implementation
    15 *
    15 //
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
    16 
    24 inline TXmlEngNode::TXmlEngNode()
    17 inline TXmlEngNode::TXmlEngNode()
    25         : iInternal(NULL) {}
    18         : iInternal(NULL) {}
    26 
    19 
    27 inline TXmlEngNode::TXmlEngNode(void* aInternal)
    20 inline TXmlEngNode::TXmlEngNode(void* aInternal)
    41 // ------------------------------------------------------------------------
    34 // ------------------------------------------------------------------------
    42 //
    35 //
    43 inline TBool TXmlEngNode::IsSameNode(TXmlEngNode aOther) const
    36 inline TBool TXmlEngNode::IsSameNode(TXmlEngNode aOther) const
    44     {return iInternal == aOther.iInternal;}
    37     {return iInternal == aOther.iInternal;}
    45 
    38 
    46 // ------------------------------------------------------------------------
    39 inline TXmlEngNode TXmlEngNode::MoveToL(TXmlEngNode aParent)
    47 // Moves the node to another part of the tree or another document
    40     {return aParent.AppendChildL(Unlink());}
    48 // The node is unliked from current postion (if any) and appended
    41 
    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)
    42 inline TXmlEngNode TXmlEngNode::MoveTo(TXmlEngNode aParent)
    56     {return aParent.AppendChildL(Unlink());}
    43     {return aParent.AppendChildL(Unlink());}
    57 
    44 
    58 inline TXmlEngAttr& TXmlEngNode::AsAttr() const                    
    45 inline TXmlEngAttr& TXmlEngNode::AsAttr() const                    
    59     {return *reinterpret_cast<TXmlEngAttr*>(const_cast<TXmlEngNode*>(this));}
    46     {return *reinterpret_cast<TXmlEngAttr*>(const_cast<TXmlEngNode*>(this));}
    83     {return *reinterpret_cast<TXmlEngComment*>(const_cast<TXmlEngNode*>(this));}
    70     {return *reinterpret_cast<TXmlEngComment*>(const_cast<TXmlEngNode*>(this));}
    84 
    71 
    85 inline TXmlEngCDATASection& TXmlEngNode::AsCDATASection()    const
    72 inline TXmlEngCDATASection& TXmlEngNode::AsCDATASection()    const
    86     {return *reinterpret_cast<TXmlEngCDATASection*>(const_cast<TXmlEngNode*>(this));}
    73     {return *reinterpret_cast<TXmlEngCDATASection*>(const_cast<TXmlEngNode*>(this));}
    87 
    74 
    88 
       
    89 inline TXmlEngEntityReference& TXmlEngNode::AsEntityReference() const
    75 inline TXmlEngEntityReference& TXmlEngNode::AsEntityReference() const
    90     {return *reinterpret_cast<TXmlEngEntityReference*>(const_cast<TXmlEngNode*>(this));}
    76     {return *reinterpret_cast<TXmlEngEntityReference*>(const_cast<TXmlEngNode*>(this));}
    91 
    77 
    92 inline TXmlEngProcessingInstruction& TXmlEngNode::AsProcessingInstruction() const
    78 inline TXmlEngProcessingInstruction& TXmlEngNode::AsProcessingInstruction() const
    93     {return *reinterpret_cast<TXmlEngProcessingInstruction*>(const_cast<TXmlEngNode*>(this));}
    79     {return *reinterpret_cast<TXmlEngProcessingInstruction*>(const_cast<TXmlEngNode*>(this));}
    94 
    80 
       
    81 inline TXmlEngDocumentFragment& TXmlEngNode::AsDocumentFragment() const
       
    82     {return *reinterpret_cast<TXmlEngDocumentFragment*>(const_cast<TXmlEngNode*>(this));}