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 
35 namespace XALAN_CPP_NAMESPACE {
36 
37 
38 
39 class XalanSourceTreeDocument;
40 class 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 {
54 public:
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  */
66  const XalanDOMString& theName,
67  const XalanDOMString& theValue,
68  XalanSourceTreeElement* theOwnerElement = 0,
69  IndexType theIndex = 0);
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*
86  getParentNode() const;
87 
88  virtual const XalanNodeList*
89  getChildNodes() const;
90 
91  virtual XalanNode*
92  getFirstChild() const;
93 
94  virtual XalanNode*
95  getLastChild() const;
96 
97  virtual XalanNode*
98  getPreviousSibling() const;
99 
100  virtual XalanNode*
101  getNextSibling() const;
102 
103  virtual const XalanNamedNodeMap*
104  getAttributes() const;
105 
106  virtual XalanDocument*
107  getOwnerDocument() const;
108 
109  virtual const XalanDOMString&
110  getNamespaceURI() const;
111 
112  virtual const XalanDOMString&
113  getPrefix() const;
114 
115  virtual const XalanDOMString&
116  getLocalName() const;
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
129  getSpecified() const;
130 
131  virtual const XalanDOMString&
132  getValue() const;
133 
134  virtual XalanElement*
135  getOwnerElement() const;
136 
137  // public interfaces not inherited from XalanAttr...
138 
139  void
141  {
142  m_ownerElement = theElement;
143  }
144 
145  void
146  setIndex(IndexType theIndex)
147  {
148  m_index = theIndex;
149  }
150 
151 private:
152 
153  // Not defined...
154  XalanSourceTreeAttr(const XalanSourceTreeAttr& theSource);
155 
157  operator=(const XalanSourceTreeAttr& theSource);
158 
159  bool
160  operator==(const XalanSourceTreeAttr& theRHS) const;
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)
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::XalanNode::NodeType
NodeType
Definition: XalanNode.hpp:47
XalanDOMString.hpp
xalanc::XalanDocument
Definition: XalanDocument.hpp:36
XalanAttr.hpp
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
xalanc::XalanSourceTreeAttr::setIndex
void setIndex(IndexType theIndex)
Definition: XalanSourceTreeAttr.hpp:146
xalanc::XalanSourceTreeAttr
Definition: XalanSourceTreeAttr.hpp:52
xalanc::XalanNode::IndexType
unsigned long IndexType
Definition: XalanNode.hpp:64
xalanc::XalanAttr
Definition: XalanAttr.hpp:40
xalanc::XalanNodeList
Definition: XalanNodeList.hpp:36
XalanSourceTreeDefinitions.hpp
xalanc::XalanSourceTreeAttr::setOwnerElement
void setOwnerElement(XalanSourceTreeElement *theElement)
Definition: XalanSourceTreeAttr.hpp:140
xalanc::XalanElement
Definition: XalanElement.hpp:44
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