Xalan-C++ API Reference 1.12.0
XalanSourceTreeAttr.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(XALANSOURCETREEATTR_HEADER_GUARD_1357924680)
19#define XALANSOURCETREEATTR_HEADER_GUARD_1357924680
20
21
22
24
25
26
28
29
30
32
33
34
35namespace XALAN_CPP_NAMESPACE {
36
37
38
39class XalanSourceTreeDocument;
40class XalanSourceTreeElement;
41
42
43
44/*
45 * <meta name="usage" content="experimental"/>
46 *
47 * Base class for the Xalan source tree Attr interface.
48 *
49 * This class is experimental and subject to change!!
50 */
51
53{
54public:
55
56 /**
57 * Constructor.
58 *
59 * @param theName The name of the attribute
60 * @param theValue The value of the attribute
61 * @param theOwnerDocument The document that owns the instance
62 * @param theOwnerElement The element that owns the instance
63 * @param theIndex The document-order index of the node.
64 */
70
71 virtual
73
74
75 // These interfaces are inherited from XalanNode...
76 virtual const XalanDOMString&
77 getNodeName() const;
78
79 virtual const XalanDOMString&
80 getNodeValue() const;
81
82 virtual NodeType
83 getNodeType() const;
84
85 virtual XalanNode*
87
88 virtual const XalanNodeList*
90
91 virtual XalanNode*
93
94 virtual XalanNode*
95 getLastChild() const;
96
97 virtual XalanNode*
99
100 virtual XalanNode*
102
103 virtual const XalanNamedNodeMap*
105
106 virtual XalanDocument*
108
109 virtual const XalanDOMString&
111
112 virtual const XalanDOMString&
113 getPrefix() const;
114
115 virtual const XalanDOMString&
117
118 virtual bool
119 isIndexed() const;
120
121 virtual IndexType
122 getIndex() const;
123
124 // These interfaces are inherited from XalanAttr...
125 virtual const XalanDOMString&
126 getName() const;
127
128 virtual bool
130
131 virtual const XalanDOMString&
132 getValue() const;
133
134 virtual XalanElement*
136
137 // public interfaces not inherited from XalanAttr...
138
139 void
141 {
142 m_ownerElement = theElement;
143 }
144
145 void
147 {
148 m_index = theIndex;
149 }
150
151private:
152
153 // Not defined...
155
157 operator=(const XalanSourceTreeAttr& theSource);
158
159 bool
161
162
163 // Data members...
164 const XalanDOMString& m_name;
165
166 const XalanDOMString& m_value;
167
168 XalanSourceTreeElement* m_ownerElement;
169
170 IndexType m_index;
171};
172
173
174
175}
176
177
178
179#endif // !defined(XALANSOURCETREEATTR_HEADER_GUARD_1357924680)
#define XALAN_XALANSOURCETREE_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual XalanNode * getLastChild() const
Gets the last child of this node.
virtual const XalanNodeList * getChildNodes() const
Gets a XalanNodeList that contains all children of this node.
virtual const XalanDOMString & getNodeName() const
Gets the name of this node, depending on its type.
virtual IndexType getIndex() const
Get the node's index.
virtual const XalanDOMString & getLocalName() const
Returns the local part of the qualified name of this node.
virtual const XalanDOMString & getValue() const
Returns the value of the attribute.
virtual const XalanDOMString & getNodeValue() const
Gets the value of this node, depending on its type.
virtual XalanNode * getNextSibling() const
Gets the node immediately following this node.
void setIndex(IndexType theIndex)
virtual const XalanDOMString & getNamespaceURI() const
Get the namespace URI of this node.
void setOwnerElement(XalanSourceTreeElement *theElement)
virtual bool getSpecified() const
virtual const XalanDOMString & getName() const
Returns the name of this attribute.
virtual XalanNode * getFirstChild() const
Gets the first child of this node.
virtual const XalanDOMString & getPrefix() const
Get the namespace prefix of this node.
virtual NodeType getNodeType() const
An enum value representing the type of the underlying object.
virtual const XalanNamedNodeMap * getAttributes() const
Gets a XalanNamedNodeMap containing the attributes of this node (if it is an XalanElement) or a null ...
virtual bool isIndexed() const
Determine if the document is node-order indexed.
virtual XalanNode * getPreviousSibling() const
Gets the node immediately preceding this node.
virtual XalanNode * getParentNode() const
Gets the parent of this node.
virtual XalanElement * getOwnerElement() const
The XalanElement node this attribute is attached to.
virtual XalanDocument * getOwnerDocument() const
Gets the XalanDocument object associated with this node.
XalanSourceTreeAttr(const XalanDOMString &theName, const XalanDOMString &theValue, XalanSourceTreeElement *theOwnerElement=0, IndexType theIndex=0)
Constructor.
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)