Xalan-C++ API Reference  1.12.0
XalanSourceTreeElementA.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(XALANSOURCETREEELEMENTA_HEADER_GUARD_1357924680)
19 #define XALANSOURCETREEELEMENTA_HEADER_GUARD_1357924680
20 
21 
22 
24 
25 
26 
28 
29 
30 
32 
33 
34 
35 namespace XALAN_CPP_NAMESPACE {
36 
37 
38 
40 {
41 public:
42 
43  /**
44  * Constructor.
45  *
46  * @param theTagName The tag name of the element
47  * @param theOwnerDocument The document that owns the instance
48  * @param theAttributes An array of pointers to the attribute instances for the element
49  * @param theAttributeCount The number of attributes.
50  * @param theParentNode The parent node, if any.
51  * @param thePreviousSibling The previous sibling, if any.
52  * @param theNextSibling The next sibling, if any.
53  * @param theIndex The document-order index of the node.
54  */
56  MemoryManager& theManager,
57  const XalanDOMString& theTagName,
58  XalanSourceTreeDocument* theOwnerDocument,
59  XalanSourceTreeAttr** theAttributes,
60  XalanSize_t 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  virtual const XalanDOMString&
74  getNamespaceURI() const;
75 
76  virtual const XalanDOMString&
77  getPrefix() const;
78 
79  virtual const XalanDOMString&
80  getLocalName() const;
81 
82 
83  // public interfaces not inherited from XalanElement...
84 
85  XalanSize_t
87  {
88  return m_attributeCount;
89  }
90 
92  getAttributeByIndex(XalanSize_t index) const
93  {
94  return index < m_attributeCount ? m_attributes[index] : 0;
95  }
96 
97 private:
98 
99  // These are from XalanNamedNodeMap...
100 
101  virtual XalanNode*
102  item(XalanSize_t index) const;
103 
104  virtual XalanNode*
105  getNamedItem(const XalanDOMString& name) const;
106 
107  virtual XalanSize_t
108  getLength() const;
109 
110  virtual XalanNode*
111  getNamedItemNS(
112  const XalanDOMString& namespaceURI,
113  const XalanDOMString& localName) const;
114 
115 
116  // Not implemented...
118 
120  operator=(const XalanSourceTreeElementA&);
121 
122  bool
123  operator==(const XalanSourceTreeElementA&) const;
124 
125 
126  // Data members...
127  XalanSourceTreeAttr* const * m_attributes;
128 
129  const XalanSize_t m_attributeCount;
130 };
131 
132 
133 
134 }
135 
136 
137 
138 #endif // !defined(XALANSOURCETREEELEMENTA_HEADER_GUARD_1357924680)
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanNode
Definition: XalanNode.hpp:38
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
xalanc::XalanSourceTreeAttr
Definition: XalanSourceTreeAttr.hpp:52
xalanc::XalanNode::IndexType
unsigned long IndexType
Definition: XalanNode.hpp:64
xalanc::XalanSourceTreeElementA::getAttributeByIndex
XalanSourceTreeAttr * getAttributeByIndex(XalanSize_t index) const
Definition: XalanSourceTreeElementA.hpp:92
XalanSourceTreeDefinitions.hpp
XalanNamedNodeMap.hpp
xalanc::XalanSourceTreeElementA::getAttributeCount
XalanSize_t getAttributeCount() const
Definition: XalanSourceTreeElementA.hpp:86
xalanc::XalanSourceTreeElementA
Definition: XalanSourceTreeElementA.hpp:39
xalanc::XalanNamedNodeMap
Definition: XalanNamedNodeMap.hpp:36
XALAN_XALANSOURCETREE_EXPORT
#define XALAN_XALANSOURCETREE_EXPORT
Definition: XalanSourceTreeDefinitions.hpp:35
xalanc::XalanSourceTreeElement
Definition: XalanSourceTreeElement.hpp:46
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::XalanSourceTreeDocument
Definition: XalanSourceTreeDocument.hpp:78
XalanSourceTreeElement.hpp