Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


XalanSourceTreeElement.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680)
19 #define XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680
20 
21 
22 
24 
25 
26 
30 
31 
32 
33 XALAN_CPP_NAMESPACE_BEGIN
34 
35 
36 
43 
44 
45 
47 {
48 public:
49 
50  /**
51  * Constructor.
52  *
53  * @param theTagName The tag name of the element
54  * @param theOwnerDocument The document that owns the instance
55  * @param theAttributes An array of pointers to the attribute instances for the element
56  * @param theAttributeCount The number of attributes.
57  * @param theParentNode The parent node, if any.
58  * @param thePreviousSibling The previous sibling, if any.
59  * @param theNextSibling The next sibling, if any.
60  * @param theIndex The document-order index of the node.
61  */
63  MemoryManager& theManager,
64  const XalanDOMString& theTagName,
65  XalanSourceTreeDocument* theOwnerDocument,
66  XalanNode* theParentNode = 0,
67  XalanNode* thePreviousSibling = 0,
68  XalanNode* theNextSibling = 0,
69  IndexType theIndex = 0);
70 
71  virtual
73 
74  MemoryManager&
76  {
77  return m_memoryManager;
78  }
79 
80  // These interfaces are inherited from XalanElement...
81 
82  virtual const XalanDOMString&
83  getNodeName() const;
84 
85  virtual const XalanDOMString&
86  getNodeValue() const;
87 
88  virtual NodeType
89  getNodeType() const;
90 
91  virtual XalanNode*
92  getParentNode() const;
93 
94  virtual const XalanNodeList*
95  getChildNodes() const;
96 
97  virtual XalanNode*
98  getFirstChild() const;
99 
100  virtual XalanNode*
101  getLastChild() const;
102 
103  virtual XalanNode*
105 
106  virtual XalanNode*
107  getNextSibling() const;
108 
109  virtual const XalanNamedNodeMap*
110  getAttributes() const = 0;
111 
112  virtual XalanDocument*
114 
115  virtual const XalanDOMString&
116  getNamespaceURI() const = 0;
117 
118  virtual const XalanDOMString&
119  getPrefix() const = 0;
120 
121  virtual const XalanDOMString&
122  getLocalName() const = 0;
123 
124  virtual bool
125  isIndexed() const;
126 
127  virtual IndexType
128  getIndex() const;
129 
130  virtual const XalanDOMString&
131  getTagName() const;
132 
133  // public interfaces not inherited from XalanElement...
134 
136  getDocument() const
137  {
138  return m_ownerDocument;
139  }
140 
141  void
143  {
144  m_parentNode = theParent;
145  }
146 
147  void
149 
150  void
152 
153  void
155 
156  void
158 
159  void
161 
162  void
164 
165  void
167 
168  void
170 
171  void
173 
174  void
176 
177  void
179 
180  void
182 
183  void
185 
186  void
187  setIndex(IndexType theIndex)
188  {
189  m_index = theIndex;
190  }
191 
192  /**
193  * Removes all of the children. Since the owner document controls the
194  * lifetime of all nodes in the document, this just sets the first child
195  * to 0.
196  */
197  void
199  {
200  m_firstChild = 0;
201  }
202 
203 protected:
204 
205  /*
206  XalanSourceTreeElement(
207  MemoryManager& theManager,
208  const XalanSourceTreeElement& theSource,
209  bool deep = false);
210  */
212 
213  // Data members...
215 
216 private:
217 
218  // Not implemented...
220 
222  operator=(const XalanSourceTreeElement& theSource);
223 
224  bool
225  operator==(const XalanSourceTreeElement& theRHS) const;
226 
227 
228  // Data members...
229  MemoryManager& m_memoryManager;
230 
231  XalanSourceTreeDocument* m_ownerDocument;
232 
233  XalanNode* m_parentNode;
234 
235  XalanNode* m_previousSibling;
236 
237  XalanNode* m_nextSibling;
238 
239  XalanNode* m_firstChild;
240 
241  IndexType m_index;
242 };
243 
244 
245 
246 XALAN_CPP_NAMESPACE_END
247 
248 
249 
250 #endif // !defined(XALANSOURCETREEELEMENT_HEADER_GUARD_1357924680)
XalanSourceTreeElement::getOwnerDocument
virtual XalanDocument * getOwnerDocument() const
Gets the Document object associated with this node.
XalanSourceTreeComment
Definition: XalanSourceTreeComment.hpp:48
XalanSourceTreeElement::setPreviousSibling
void setPreviousSibling(XalanSourceTreeElement *thePreviousSibling)
XalanNode::NodeType
NodeType
Definition: XalanNode.hpp:48
XalanSourceTreeElement::clearChildren
void clearChildren()
Removes all of the children.
Definition: XalanSourceTreeElement.hpp:198
XalanSourceTreeElement::getParentNode
virtual XalanNode * getParentNode() const
Gets the parent of this node.
XalanSourceTreeText
Definition: XalanSourceTreeText.hpp:47
XalanSourceTreeElement::getNodeValue
virtual const XalanDOMString & getNodeValue() const
Gets the value of this node, depending on its type.
XalanSourceTreeElement::setPreviousSibling
void setPreviousSibling(XalanSourceTreeProcessingInstruction *thePreviousSibling)
XalanSourceTreeElement::getFirstChild
virtual XalanNode * getFirstChild() const
Gets the first child of this node.
XalanSourceTreeElement::getIndex
virtual IndexType getIndex() const
Get the node's index.
XalanSourceTreeElement::setIndex
void setIndex(IndexType theIndex)
Definition: XalanSourceTreeElement.hpp:187
XalanSourceTreeElement::getPreviousSibling
virtual XalanNode * getPreviousSibling() const
Gets the node immediately preceding this node.
XalanElement.hpp
XalanDocument
Definition: XalanDocument.hpp:37
XalanSourceTreeElement::getChildNodes
virtual const XalanNodeList * getChildNodes() const
Gets a NodeList that contains all children of this node.
XalanDOMString.hpp
XalanSourceTreeProcessingInstruction
Definition: XalanSourceTreeProcessingInstruction.hpp:48
XalanSourceTreeElement::appendSiblingNode
void appendSiblingNode(XalanSourceTreeText *theSibling)
XalanSourceTreeAttr
Definition: XalanSourceTreeAttr.hpp:53
XalanSourceTreeElement::XalanSourceTreeElement
XalanSourceTreeElement(MemoryManager &theManager, const XalanDOMString &theTagName, XalanSourceTreeDocument *theOwnerDocument, XalanNode *theParentNode=0, XalanNode *thePreviousSibling=0, XalanNode *theNextSibling=0, IndexType theIndex=0)
Constructor.
XalanSourceTreeElement::appendChildNode
void appendChildNode(XalanSourceTreeComment *theChild)
XalanSourceTreeElement::appendSiblingNode
void appendSiblingNode(XalanSourceTreeProcessingInstruction *theSibling)
XalanSourceTreeElement::getLocalName
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
XalanElement
Definition: XalanElement.hpp:45
XalanSourceTreeElement::getMemoryManager
MemoryManager & getMemoryManager()
Definition: XalanSourceTreeElement.hpp:75
XalanSourceTreeElement::setParent
void setParent(XalanSourceTreeDocumentFragment *theParent)
XalanSourceTreeElement::appendSiblingNode
void appendSiblingNode(XalanSourceTreeElement *theSibling)
XalanSourceTreeElement::getNamespaceURI
virtual const XalanDOMString & getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
XalanNode::IndexType
unsigned long IndexType
Definition: XalanNode.hpp:64
XalanSourceTreeElement
Definition: XalanSourceTreeElement.hpp:47
XalanSourceTreeElement::getDocument
XalanSourceTreeDocument * getDocument() const
Definition: XalanSourceTreeElement.hpp:136
XalanSourceTreeElement::appendChildNode
void appendChildNode(XalanSourceTreeText *theChild)
XalanSourceTreeElement::~XalanSourceTreeElement
virtual ~XalanSourceTreeElement()
XalanNodeList
Definition: XalanNodeList.hpp:37
XalanSourceTreeDocument
Definition: XalanSourceTreeDocument.hpp:76
XalanSourceTreeElement::isIndexed
virtual bool isIndexed() const
Determine if the document is node-order indexed.
XalanSourceTreeDefinitions.hpp
XalanSourceTreeElement::setParent
void setParent(XalanSourceTreeElement *theParent)
Definition: XalanSourceTreeElement.hpp:142
XalanSourceTreeElement::getAttributes
virtual const XalanNamedNodeMap * getAttributes() const =0
Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
XalanSourceTreeElement::getNextSibling
virtual XalanNode * getNextSibling() const
Gets the node immediately following this node.
XalanDOMString
Definition: XalanDOMString.hpp:46
XalanSourceTreeElement::appendChildNode
void appendChildNode(XalanSourceTreeElement *theChild)
XalanSourceTreeElement::getTagName
virtual const XalanDOMString & getTagName() const
The name of the element.
XalanSourceTreeElement::appendSiblingNode
void appendSiblingNode(XalanSourceTreeComment *theSibling)
XalanSourceTreeElement::getPrefix
virtual const XalanDOMString & getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
XalanSourceTreeDocumentFragment
Definition: XalanSourceTreeDocumentFragment.hpp:52
XalanNamedNodeMap.hpp
XalanElement::operator==
bool operator==(const XalanElement &theRHS) const
XalanSourceTreeElement::getNodeName
virtual const XalanDOMString & getNodeName() const
Gets the name of this node, depending on its type.
XalanSourceTreeElement::getNodeType
virtual NodeType getNodeType() const
An enum value representing the type of the underlying object.
XalanSourceTreeElement::m_tagName
const XalanDOMString & m_tagName
Definition: XalanSourceTreeElement.hpp:214
XalanSourceTreeElement::setPreviousSibling
void setPreviousSibling(XalanSourceTreeComment *thePreviousSibling)
XALAN_XALANSOURCETREE_EXPORT
#define XALAN_XALANSOURCETREE_EXPORT
Definition: XalanSourceTreeDefinitions.hpp:35
XalanSourceTreeElement::getLastChild
virtual XalanNode * getLastChild() const
Gets the last child of this node.
XalanElement::operator=
XalanElement & operator=(const XalanElement &theSource)
XalanNode
Definition: XalanNode.hpp:39
XalanSourceTreeElement::s_emptyString
static const XalanDOMString s_emptyString
Definition: XalanSourceTreeElement.hpp:211
XalanSourceTreeElement::appendChildNode
void appendChildNode(XalanSourceTreeProcessingInstruction *theChild)
XalanNamedNodeMap
Definition: XalanNamedNodeMap.hpp:37
XalanSourceTreeElement::setPreviousSibling
void setPreviousSibling(XalanSourceTreeText *thePreviousSibling)

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo