Xalan-C++ API Reference  1.12.0
XalanEntityReference.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(XALANENTITYREFERENCE_HEADER_GUARD_1357924680)
19 #define XALANENTITYREFERENCE_HEADER_GUARD_1357924680
20 
21 
22 
25 
26 
27 
28 namespace XALAN_CPP_NAMESPACE {
29 
30 
31 
32 /*
33  * <meta name="usage" content="deprecated"/>
34  *
35  * Base class for the DOM EntityReference interface.
36  *
37  * This class is deprecated and should not be used!!
38  */
39 
41 {
42 public:
43 
45 
46  virtual
48 
49 
50  // These interfaces are inherited from XalanNode...
51  virtual const XalanDOMString&
52  getNodeName() const = 0;
53 
54  /**
55  * Gets the value of this node, depending on its type.
56  */
57  virtual const XalanDOMString&
58  getNodeValue() const = 0;
59 
60  /**
61  * An enum value representing the type of the underlying object.
62  */
63  virtual NodeType
64  getNodeType() const = 0;
65 
66  /**
67  * Gets the parent of this node.
68  *
69  * All nodes, except <code>Document</code>,
70  * <code>DocumentFragment</code>, and <code>Attr</code> may have a parent.
71  * However, if a node has just been created and not yet added to the tree,
72  * or if it has been removed from the tree, a <code>null</code> Node
73  * is returned.
74  */
75  virtual XalanNode*
76  getParentNode() const = 0;
77 
78  /**
79  * Gets a <code>NodeList</code> that contains all children of this node.
80  *
81  * If there
82  * are no children, this is a <code>NodeList</code> containing no nodes.
83  * The content of the returned <code>NodeList</code> is "live" in the sense
84  * that, for instance, changes to the children of the node object that
85  * it was created from are immediately reflected in the nodes returned by
86  * the <code>NodeList</code> accessors; it is not a static snapshot of the
87  * content of the node. This is true for every <code>NodeList</code>,
88  * including the ones returned by the <code>getElementsByTagName</code>
89  * method.
90  */
91  virtual const XalanNodeList*
92  getChildNodes() const = 0;
93 
94  /**
95  * Gets the first child of this node.
96  *
97  * If there is no such node, this returns <code>null</code>.
98  */
99  virtual XalanNode*
100  getFirstChild() const = 0;
101 
102  /**
103  * Gets the last child of this node.
104  *
105  * If there is no such node, this returns <code>null</code>.
106  */
107  virtual XalanNode*
108  getLastChild() const = 0;
109 
110  /**
111  * Gets the node immediately preceding this node.
112  *
113  * If there is no such node, this returns <code>null</code>.
114  */
115  virtual XalanNode*
116  getPreviousSibling() const = 0;
117 
118  /**
119  * Gets the node immediately following this node.
120  *
121  * If there is no such node, this returns <code>null</code>.
122  */
123  virtual XalanNode*
124  getNextSibling() const = 0;
125 
126  /**
127  * Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it
128  * is an <code>Element</code>) or <code>null</code> otherwise.
129  */
130  virtual const XalanNamedNodeMap*
131  getAttributes() const = 0;
132 
133  /**
134  * Gets the <code>Document</code> object associated with this node.
135  *
136  * This is also
137  * the <code>Document</code> object used to create new nodes. When this
138  * node is a <code>Document</code> or a <code>DocumentType</code>
139  * which is not used with any <code>Document</code> yet, this is
140  * <code>null</code>.
141  */
142  virtual XalanDocument*
143  getOwnerDocument() const = 0;
144 
145  /**
146  * Get the <em>namespace URI</em> of
147  * this node, or <code>null</code> if it is unspecified.
148  * <p>
149  * This is not a computed value that is the result of a namespace lookup
150  * based on an examination of the namespace declarations in scope. It is
151  * merely the namespace URI given at creation time.
152  * <p>
153  * For nodes of any type other than <CODE>ELEMENT_NODE</CODE> and
154  * <CODE>ATTRIBUTE_NODE</CODE> and nodes created with a DOM Level 1 method,
155  * such as <CODE>createElement</CODE> from the <CODE>Document</CODE>
156  * interface, this is always <CODE>null</CODE>.
157  */
158  virtual const XalanDOMString&
159  getNamespaceURI() const = 0;
160 
161  /**
162  * Get the <em>namespace prefix</em>
163  * of this node, or <code>null</code> if it is unspecified.
164  */
165  virtual const XalanDOMString&
166  getPrefix() const = 0;
167 
168  /**
169  * Returns the local part of the <em>qualified name</em> of this node.
170  * <p>
171  * For nodes created with a DOM Level 1 method, such as
172  * <code>createElement</code> from the <code>Document</code> interface,
173  * it is null.
174  */
175  virtual const XalanDOMString&
176  getLocalName() const = 0;
177 
178  /**
179  * Determine if the document is node-order indexed.
180  *
181  * @return true if the document is indexed, otherwise false.
182  */
183  virtual bool
184  isIndexed() const = 0;
185 
186  /**
187  * Get the node's index. Valid only if the owner document
188  * reports that the document is node-order indexed.
189  *
190  * @return The index value, or 0 if the node is not indexed.
191  */
192  virtual IndexType
193  getIndex() const = 0;
194 
195 protected:
196 
197  XalanEntityReference(const XalanEntityReference& theSource);
198 
200  operator=(const XalanEntityReference& theSource);
201 
202  bool
203  operator==(const XalanEntityReference& theRHS) const;
204 
205 private:
206 };
207 
208 
209 
210 }
211 
212 
213 
214 #endif // !defined(XALANENTITYREFERENCE_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
xalanc::XalanDocument
Definition: XalanDocument.hpp:36
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
xalanc::XalanNode::IndexType
unsigned long IndexType
Definition: XalanNode.hpp:64
XalanNode.hpp
xalanc::XalanNodeList
Definition: XalanNodeList.hpp:36
xalanc::XalanEntityReference
Definition: XalanEntityReference.hpp:40
xalanc::XalanNamedNodeMap
Definition: XalanNamedNodeMap.hpp:36
XalanDOMDefinitions.hpp
XALAN_DOM_EXPORT
#define XALAN_DOM_EXPORT
Definition: XalanDOMDefinitions.hpp:37
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45