1.1 --- a/epoc32/include/xmlengnode.inl Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/xmlengnode.inl Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,94 @@
1.4 -xmlengnode.inl
1.5 +/*
1.6 +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Node functions implementation
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +
1.28 +inline TXmlEngNode::TXmlEngNode()
1.29 + : iInternal(NULL) {}
1.30 +
1.31 +inline TXmlEngNode::TXmlEngNode(void* aInternal)
1.32 + : iInternal(aInternal) {}
1.33 +
1.34 +inline TBool TXmlEngNode::IsNull() const
1.35 + {return iInternal == NULL;}
1.36 +
1.37 +inline TBool TXmlEngNode::NotNull() const
1.38 + {return iInternal != NULL;}
1.39 +
1.40 +// ------------------------------------------------------------------------
1.41 +// Compares nodes.
1.42 +//
1.43 +// The nodes are the same if they are referring to the same in-memory
1.44 +// data structure.
1.45 +// ------------------------------------------------------------------------
1.46 +//
1.47 +inline TBool TXmlEngNode::IsSameNode(TXmlEngNode aOther) const
1.48 + {return iInternal == aOther.iInternal;}
1.49 +
1.50 +// ------------------------------------------------------------------------
1.51 +// Moves the node to another part of the tree or another document
1.52 +// The node is unliked from current postion (if any) and appended
1.53 +// to the its new parent.
1.54 +//
1.55 +// @note
1.56 +// In many cases this method call should be followed by ReconcileNamespacesL() on the moved node
1.57 +// ------------------------------------------------------------------------
1.58 +//
1.59 +inline TXmlEngNode TXmlEngNode::MoveTo(TXmlEngNode aParent)
1.60 + {return aParent.AppendChildL(Unlink());}
1.61 +
1.62 +inline TXmlEngAttr& TXmlEngNode::AsAttr() const
1.63 + {return *reinterpret_cast<TXmlEngAttr*>(const_cast<TXmlEngNode*>(this));}
1.64 +
1.65 +inline TXmlEngElement& TXmlEngNode::AsElement() const
1.66 + {return *reinterpret_cast<TXmlEngElement*>(const_cast<TXmlEngNode*>(this));}
1.67 +
1.68 +inline TXmlEngTextNode& TXmlEngNode::AsText() const
1.69 + {return *reinterpret_cast<TXmlEngTextNode*>(const_cast<TXmlEngNode*>(this));}
1.70 +
1.71 +inline TXmlEngBinaryContainer& TXmlEngNode::AsBinaryContainer() const
1.72 + {return *reinterpret_cast<TXmlEngBinaryContainer*>(const_cast<TXmlEngNode*>(this));}
1.73 +
1.74 +inline TXmlEngChunkContainer& TXmlEngNode::AsChunkContainer() const
1.75 + {return *reinterpret_cast<TXmlEngChunkContainer*>(const_cast<TXmlEngNode*>(this));}
1.76 +
1.77 +inline TXmlEngFileContainer& TXmlEngNode::AsFileContainer() const
1.78 + {return *reinterpret_cast<TXmlEngFileContainer*>(const_cast<TXmlEngNode*>(this));}
1.79 +
1.80 +inline TXmlEngDataContainer& TXmlEngNode::AsDataContainer() const
1.81 + {return *reinterpret_cast<TXmlEngDataContainer*>(const_cast<TXmlEngNode*>(this));}
1.82 +
1.83 +inline TXmlEngNamespace& TXmlEngNode::AsNamespace() const
1.84 + {return *reinterpret_cast<TXmlEngNamespace*>(const_cast<TXmlEngNode*>(this));}
1.85 +
1.86 +inline TXmlEngComment& TXmlEngNode::AsComment() const
1.87 + {return *reinterpret_cast<TXmlEngComment*>(const_cast<TXmlEngNode*>(this));}
1.88 +
1.89 +inline TXmlEngCDATASection& TXmlEngNode::AsCDATASection() const
1.90 + {return *reinterpret_cast<TXmlEngCDATASection*>(const_cast<TXmlEngNode*>(this));}
1.91 +
1.92 +
1.93 +inline TXmlEngEntityReference& TXmlEngNode::AsEntityReference() const
1.94 + {return *reinterpret_cast<TXmlEngEntityReference*>(const_cast<TXmlEngNode*>(this));}
1.95 +
1.96 +inline TXmlEngProcessingInstruction& TXmlEngNode::AsProcessingInstruction() const
1.97 + {return *reinterpret_cast<TXmlEngProcessingInstruction*>(const_cast<TXmlEngNode*>(this));}
1.98 +