00001 /* 00002 * Copyright 1999-2004 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 #if !defined(XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680) 00017 #define XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680 00018 00019 00020 00021 #include <xalanc/XalanSourceTree/XalanSourceTreeDefinitions.hpp> 00022 00023 00024 00025 #include <xalanc/XalanDOM/XalanDOMString.hpp> 00026 #include <xalanc/XalanDOM/XalanElement.hpp> 00027 #include <xalanc/XalanDOM/XalanNamedNodeMap.hpp> 00028 00029 00030 00031 XALAN_CPP_NAMESPACE_BEGIN 00032 00033 00034 00035 class XalanSourceTreeAttr; 00036 class XalanSourceTreeComment; 00037 class XalanSourceTreeDocument; 00038 class XalanSourceTreeDocumentFragment; 00039 class XalanSourceTreeProcessingInstruction; 00040 class XalanSourceTreeText; 00041 00042 00043 00044 class XALAN_XALANSOURCETREE_EXPORT XalanSourceTreeElement : public XalanElement 00045 { 00046 public: 00047 00060 XalanSourceTreeElement( 00061 MemoryManagerType& theManager, 00062 const XalanDOMString& theTagName, 00063 XalanSourceTreeDocument* theOwnerDocument, 00064 XalanNode* theParentNode = 0, 00065 XalanNode* thePreviousSibling = 0, 00066 XalanNode* theNextSibling = 0, 00067 IndexType theIndex = 0); 00068 00069 virtual 00070 ~XalanSourceTreeElement(); 00071 00072 MemoryManagerType& 00073 getMemoryManager() 00074 { 00075 return m_memoryManager; 00076 } 00080 virtual const XalanDOMString& 00081 getNodeName() const; 00082 00086 virtual const XalanDOMString& 00087 getNodeValue() const; 00088 00092 virtual NodeType 00093 getNodeType() const; 00094 00104 virtual XalanNode* 00105 getParentNode() const; 00106 00120 virtual const XalanNodeList* 00121 getChildNodes() const; 00122 00128 virtual XalanNode* 00129 getFirstChild() const; 00130 00136 virtual XalanNode* 00137 getLastChild() const; 00138 00144 virtual XalanNode* 00145 getPreviousSibling() const; 00146 00152 virtual XalanNode* 00153 getNextSibling() const; 00154 00159 virtual const XalanNamedNodeMap* 00160 getAttributes() const = 0; 00161 00171 virtual XalanDocument* 00172 getOwnerDocument() const; 00173 00175 00177 00196 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE) 00197 virtual XalanNode* 00198 #else 00199 virtual XalanSourceTreeElement* 00200 #endif 00201 cloneNode(bool deep) const = 0; 00202 00204 00206 00223 virtual XalanNode* 00224 insertBefore( 00225 XalanNode* newChild, 00226 XalanNode* refChild); 00227 00241 virtual XalanNode* 00242 replaceChild( 00243 XalanNode* newChild, 00244 XalanNode* oldChild); 00245 00253 virtual XalanNode* 00254 removeChild(XalanNode* oldChild); 00255 00267 virtual XalanNode* 00268 appendChild(XalanNode* newChild); 00269 00271 00273 00281 virtual bool 00282 hasChildNodes() const; 00283 00284 00286 00288 00289 00303 virtual void 00304 setNodeValue(const XalanDOMString& nodeValue); 00305 00307 00309 00326 virtual void 00327 normalize(); 00328 00342 virtual bool 00343 isSupported( 00344 const XalanDOMString& feature, 00345 const XalanDOMString& version) const; 00346 00360 virtual const XalanDOMString& 00361 getNamespaceURI() const = 0; 00362 00367 virtual const XalanDOMString& 00368 getPrefix() const = 0; 00369 00377 virtual const XalanDOMString& 00378 getLocalName() const = 0; 00379 00409 virtual void 00410 setPrefix(const XalanDOMString& prefix); 00411 00412 virtual bool 00413 isIndexed() const; 00414 00415 virtual IndexType 00416 getIndex() const; 00417 00419 00420 // These interfaces are inherited from XalanElement... 00421 00430 virtual const XalanDOMString& 00431 getTagName() const; 00432 00440 virtual const XalanDOMString& 00441 getAttribute(const XalanDOMString& name) const = 0; 00442 00450 virtual XalanAttr* 00451 getAttributeNode(const XalanDOMString& name) const = 0; 00452 00463 virtual XalanNodeList* 00464 getElementsByTagName(const XalanDOMString& name) const; 00465 00467 00469 00491 virtual void 00492 setAttribute( 00493 const XalanDOMString& name, 00494 const XalanDOMString& value); 00495 00515 virtual XalanAttr* 00516 setAttributeNode(XalanAttr* newAttr); 00517 00519 00521 00537 virtual XalanAttr* 00538 removeAttributeNode(XalanAttr* oldAttr); 00539 00552 virtual void 00553 removeAttribute(const XalanDOMString& name); 00554 00556 00558 00569 virtual const XalanDOMString& 00570 getAttributeNS( 00571 const XalanDOMString& namespaceURI, 00572 const XalanDOMString& localName) const = 0; 00573 00614 virtual void 00615 setAttributeNS( 00616 const XalanDOMString& namespaceURI, 00617 const XalanDOMString& qualifiedName, 00618 const XalanDOMString& value); 00619 00634 virtual void 00635 removeAttributeNS( 00636 const XalanDOMString& namespaceURI, 00637 const XalanDOMString& localName); 00638 00649 virtual XalanAttr* 00650 getAttributeNodeNS( 00651 const XalanDOMString& namespaceURI, 00652 const XalanDOMString& localName) const = 0; 00653 00673 virtual XalanAttr* 00674 setAttributeNodeNS(XalanAttr* newAttr); 00675 00691 virtual XalanNodeList* 00692 getElementsByTagNameNS( 00693 const XalanDOMString& namespaceURI, 00694 const XalanDOMString& localName) const; 00695 00697 00698 00699 // public interfaces not inherited from XalanElement... 00700 00701 XalanSourceTreeDocument* 00702 getDocument() const 00703 { 00704 return m_ownerDocument; 00705 } 00706 00707 void 00708 setParent(XalanSourceTreeElement* theParent) 00709 { 00710 m_parentNode = theParent; 00711 } 00712 00713 void 00714 setParent(XalanSourceTreeDocumentFragment* theParent); 00715 00716 void 00717 setPreviousSibling(XalanSourceTreeComment* thePreviousSibling); 00718 00719 void 00720 setPreviousSibling(XalanSourceTreeElement* thePreviousSibling); 00721 00722 void 00723 setPreviousSibling(XalanSourceTreeProcessingInstruction* thePreviousSibling); 00724 00725 void 00726 setPreviousSibling(XalanSourceTreeText* thePreviousSibling); 00727 00728 void 00729 appendSiblingNode(XalanSourceTreeComment* theSibling); 00730 00731 void 00732 appendSiblingNode(XalanSourceTreeElement* theSibling); 00733 00734 void 00735 appendSiblingNode(XalanSourceTreeProcessingInstruction* theSibling); 00736 00737 void 00738 appendSiblingNode(XalanSourceTreeText* theSibling); 00739 00740 void 00741 appendChildNode(XalanSourceTreeComment* theChild); 00742 00743 void 00744 appendChildNode(XalanSourceTreeElement* theChild); 00745 00746 void 00747 appendChildNode(XalanSourceTreeProcessingInstruction* theChild); 00748 00749 void 00750 appendChildNode(XalanSourceTreeText* theChild); 00751 00752 void 00753 setIndex(IndexType theIndex) 00754 { 00755 m_index = theIndex; 00756 } 00757 00763 void 00764 clearChildren() 00765 { 00766 m_firstChild = 0; 00767 } 00768 00769 protected: 00770 00771 XalanSourceTreeElement( 00772 MemoryManagerType& theManager, 00773 const XalanSourceTreeElement& theSource, 00774 bool deep = false); 00775 00776 static const XalanDOMString s_emptyString; 00777 00778 // Data members... 00779 const XalanDOMString& m_tagName; 00780 00781 private: 00782 00783 // Not implemented... 00784 XalanSourceTreeElement& 00785 operator=(const XalanSourceTreeElement& theSource); 00786 00787 bool 00788 operator==(const XalanSourceTreeElement& theRHS) const; 00789 00790 00791 // Data members... 00792 MemoryManagerType& m_memoryManager; 00793 00794 XalanSourceTreeDocument* m_ownerDocument; 00795 00796 XalanNode* m_parentNode; 00797 00798 XalanNode* m_previousSibling; 00799 00800 XalanNode* m_nextSibling; 00801 00802 XalanNode* m_firstChild; 00803 00804 IndexType m_index; 00805 }; 00806 00807 00808 00809 XALAN_CPP_NAMESPACE_END 00810 00811 00812 00813 #endif // !defined(XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680)
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.10 |
|