Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanSourceTreeElementA.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #if !defined(XALANSOURCETREEELEMENTA_HEADER_GUARD_1357924680)
17 #define XALANSOURCETREEELEMENTA_HEADER_GUARD_1357924680
18 
19 
20 
22 
23 
24 
26 
27 
28 
30 
31 
32 
33 XALAN_CPP_NAMESPACE_BEGIN
34 
35 
36 
38 {
39 public:
40 
41  typedef unsigned long AttributesCountType;
42 
56  MemoryManagerType& theManager,
57  const XalanDOMString& theTagName,
58  XalanSourceTreeDocument* theOwnerDocument,
59  XalanSourceTreeAttr** theAttributes,
60  AttributesCountType theAttributeCount,
61  XalanNode* theParentNode = 0,
62  XalanNode* thePreviousSibling = 0,
63  XalanNode* theNextSibling = 0,
64  IndexType theIndex = 0);
65 
66  virtual
68 
69 
70  virtual const XalanNamedNodeMap*
71  getAttributes() const;
72 
73 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
74  virtual XalanNode*
75 #else
77 #endif
78  cloneNode(bool deep) const;
79 
80  virtual const XalanDOMString&
81  getNamespaceURI() const;
82 
83  virtual const XalanDOMString&
84  getPrefix() const;
85 
86  virtual const XalanDOMString&
87  getLocalName() const;
88 
89  virtual const XalanDOMString&
90  getAttribute(const XalanDOMString& name) const;
91 
92  virtual XalanAttr*
93  getAttributeNode(const XalanDOMString& name) const;
94 
95  virtual const XalanDOMString&
97  const XalanDOMString& namespaceURI,
98  const XalanDOMString& localName) const;
99 
100  virtual XalanAttr*
102  const XalanDOMString& namespaceURI,
103  const XalanDOMString& localName) const;
104 
105 
106  // public interfaces not inherited from XalanElement...
107 
110  {
111  return m_attributeCount;
112  }
113 
116  {
117  return index < m_attributeCount ? m_attributes[index] : 0;
118  }
119 
121  clone(bool deep) const
122  {
123  MemoryManagerType& theManager = const_cast<XalanSourceTreeElementA*>(this)->getMemoryManager();
124 
125  return XalanSourceTreeElementA::create(theManager, *this, deep);
126  }
127 
128 protected:
129 
131  MemoryManagerType& theManager,
132  const XalanSourceTreeElementA& theSource,
133  bool deep = false);
134 
136  create(
137  MemoryManagerType& theManager,
138  const XalanSourceTreeElementA& theSource,
139  bool deep = false);
140 
141 private:
142 
143  // These are from XalanNamedNodeMap...
144 
145  virtual XalanNode*
146  setNamedItem(XalanNode* arg);
147 
148  virtual XalanNode*
149  item(unsigned int index) const;
150 
151  virtual XalanNode*
152  getNamedItem(const XalanDOMString& name) const;
153 
154  virtual unsigned int
155  getLength() const;
156 
157  virtual XalanNode*
158  removeNamedItem(const XalanDOMString& name);
159 
160  virtual XalanNode*
162  const XalanDOMString& namespaceURI,
163  const XalanDOMString& localName) const;
164 
165  virtual XalanNode*
167 
168  virtual XalanNode*
170  const XalanDOMString& namespaceURI,
171  const XalanDOMString& localName);
172 
173 
174  // Not implemented...
176  operator=(const XalanSourceTreeElementA& theSource);
177 
178  bool
179  operator==(const XalanSourceTreeElementA& theRHS) const;
180 
181 
182  // Data members...
183  XalanSourceTreeAttr* const * m_attributes;
184 
185  const AttributesCountType m_attributeCount;
186 };
187 
188 
189 
190 XALAN_CPP_NAMESPACE_END
191 
192 
193 
194 #endif // !defined(XALANSOURCETREEELEMENTA_HEADER_GUARD_1357924680)
AttributesCountType getAttributeCount() const
Definition: XalanSourceTreeElementA.hpp:109
Definition: XalanNode.hpp:44
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual XalanAttr * getAttributeNode(const XalanDOMString &name) const =0
Retrieves an DOM_Attr node by name.
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
Definition: XalanAttr.hpp:38
virtual XalanSourceTreeElement * cloneNode(bool deep) const =0
Returns a duplicate of this node.
MemoryManagerType & getMemoryManager()
Definition: XalanSourceTreeElement.hpp:73
static XalanSourceTreeElementA * create(MemoryManagerType &theManager, const XalanSourceTreeElementA &theSource, bool deep=false)
bool operator==(const XalanNamedNodeMap &theRHS) const
virtual XalanAttr * getAttributeNodeNS(const XalanDOMString &namespaceURI, const XalanDOMString &localName) const =0
Retrieves an DOM_Attr node by local name and namespace URI.
virtual XalanNode * setNamedItem(XalanNode *arg)=0
Adds a node using its nodeName attribute.
virtual XalanNode * getNamedItemNS(const XalanDOMString &namespaceURI, const XalanDOMString &localName) const =0
Retrieves a node specified by local name and namespace URI.
virtual const XalanDOMString & getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
XalanSourceTreeElementA * clone(bool deep) const
Definition: XalanSourceTreeElementA.hpp:121
#define XALAN_XALANSOURCETREE_EXPORT
Definition: XalanSourceTreeDefinitions.hpp:33
Definition: XalanNamedNodeMap.hpp:42
virtual const XalanDOMString & getAttributeNS(const XalanDOMString &namespaceURI, const XalanDOMString &localName) const =0
Retrieves an attribute value by local name and namespace URI.
virtual XalanNode * setNamedItemNS(XalanNode *arg)=0
Adds a node using its namespaceURI and localName.
virtual XalanNode * removeNamedItem(const XalanDOMString &name)=0
Removes a node specified by name.
XalanSourceTreeAttr * getAttributeByIndex(AttributesCountType index) const
Definition: XalanSourceTreeElementA.hpp:115
virtual const XalanNamedNodeMap * getAttributes() const =0
Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise...
virtual XalanNode * getNamedItem(const XalanDOMString &name) const =0
Retrieves a node specified by name.
Definition: XalanSourceTreeAttr.hpp:50
virtual XalanNode * item(unsigned int index) const =0
Returns the indexth item in the map.
unsigned long AttributesCountType
Definition: XalanSourceTreeElementA.hpp:41
virtual XalanNode * removeNamedItemNS(const XalanDOMString &namespaceURI, const XalanDOMString &localName)=0
Removes a node specified by local name and namespace URI.
Definition: XalanDOMString.hpp:42
virtual const XalanDOMString & getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
unsigned long IndexType
Definition: XalanNode.hpp:70
XalanNamedNodeMap & operator=(const XalanNamedNodeMap &theSource)
Definition: XalanSourceTreeDocument.hpp:73
virtual unsigned int getLength() const =0
The number of nodes in the map.
Definition: XalanSourceTreeElement.hpp:44
Definition: XalanSourceTreeElementA.hpp:37
virtual const XalanDOMString & getAttribute(const XalanDOMString &name) const =0
Retrieves an attribute value by name.

Interpreting class diagrams

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

dot

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

Apache Logo