Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanSourceTreeAttr.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(XALANSOURCETREEATTR_HEADER_GUARD_1357924680)
17 #define XALANSOURCETREEATTR_HEADER_GUARD_1357924680
18 
19 
20 
22 
23 
24 
26 
27 
28 
30 
31 
32 
33 XALAN_CPP_NAMESPACE_BEGIN
34 
35 
36 
39 
40 
41 
42 /*
43  * <meta name="usage" content="experimental"/>
44  *
45  * Base class for the Xalan source tree Attr interface.
46  *
47  * This class is experimental and subject to change!!
48  */
49 
51 {
52 public:
53 
64  const XalanDOMString& theName,
65  const XalanDOMString& theValue,
66  XalanSourceTreeElement* theOwnerElement = 0,
67  IndexType theIndex = 0);
68 
69  virtual
71 
72 
73  // These interfaces are inherited from XalanNode...
74  virtual const XalanDOMString&
75  getNodeName() const;
76 
80  virtual const XalanDOMString&
81  getNodeValue() const;
82 
86  virtual NodeType
87  getNodeType() const;
88 
98  virtual XalanNode*
99  getParentNode() const;
100 
114  virtual const XalanNodeList*
115  getChildNodes() const;
116 
122  virtual XalanNode*
123  getFirstChild() const;
124 
130  virtual XalanNode*
131  getLastChild() const;
132 
138  virtual XalanNode*
139  getPreviousSibling() const;
140 
146  virtual XalanNode*
147  getNextSibling() const;
148 
153  virtual const XalanNamedNodeMap*
154  getAttributes() const;
155 
165  virtual XalanDocument*
166  getOwnerDocument() const;
167 
169 
171 
190 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
191  virtual XalanNode*
192 #else
193  virtual XalanSourceTreeAttr*
194 #endif
195  cloneNode(bool deep) const;
196 
198 
200 
217  virtual XalanNode*
218  insertBefore(
219  XalanNode* newChild,
220  XalanNode* refChild);
221 
235  virtual XalanNode*
236  replaceChild(
237  XalanNode* newChild,
238  XalanNode* oldChild);
239 
247  virtual XalanNode*
248  removeChild(XalanNode* oldChild);
249 
261  virtual XalanNode*
262  appendChild(XalanNode* newChild);
263 
265 
267 
275  virtual bool
276  hasChildNodes() const;
277 
278 
280 
282 
283 
297  virtual void
298  setNodeValue(const XalanDOMString& nodeValue);
299 
301 
303 
320  virtual void
321  normalize();
322 
336  virtual bool
337  isSupported(
338  const XalanDOMString& feature,
339  const XalanDOMString& version) const;
340 
354  virtual const XalanDOMString&
355  getNamespaceURI() const;
356 
361  virtual const XalanDOMString&
362  getPrefix() const;
363 
371  virtual const XalanDOMString&
372  getLocalName() const;
373 
403  virtual void
404  setPrefix(const XalanDOMString& prefix);
405 
411  virtual bool
412  isIndexed() const;
413 
420  virtual IndexType
421  getIndex() const;
422 
424 
425  // These interfaces are inherited from XalanAttr...
426 
433  virtual const XalanDOMString&
434  getName() const;
435 
443  virtual bool
444  getSpecified() const;
445 
452  virtual const XalanDOMString&
453  getValue() const;
454 
456 
458 
465  virtual void
466  setValue(const XalanDOMString& value);
467 
469 
476  virtual XalanElement*
477  getOwnerElement() const;
479 
480 
481  // public interfaces not inherited from XalanAttr...
482 
483  void
485  {
486  m_ownerElement = theElement;
487  }
488 
489  void
490  setIndex(IndexType theIndex)
491  {
492  m_index = theIndex;
493  }
494 
495 protected:
496 
498  const XalanSourceTreeAttr& theSource,
499  bool deep = false);
500 
501 private:
502 
503  // Not defined...
505  operator=(const XalanSourceTreeAttr& theSource);
506 
507  bool
508  operator==(const XalanSourceTreeAttr& theRHS) const;
509 
510 
511  // Data members...
512  const XalanDOMString& m_name;
513 
514  const XalanDOMString& m_value;
515 
516  XalanSourceTreeElement* m_ownerElement;
517 
518  IndexType m_index;
519 };
520 
521 
522 
523 XALAN_CPP_NAMESPACE_END
524 
525 
526 
527 #endif // !defined(XALANSOURCETREEATTR_HEADER_GUARD_1357924680)
Definition: XalanNode.hpp:44
Definition: XalanNodeList.hpp:42
virtual bool getSpecified() const =0
Returns true if the attribute received its value explicitly in the XML document, or if a value was as...
virtual bool isSupported(const XalanDOMString &feature, const XalanDOMString &version) const =0
Tests whether the DOM implementation implements a specific feature and that feature is supported by t...
Definition: XalanAttr.hpp:38
virtual XalanAttr * cloneNode(bool deep) const =0
Returns a duplicate of this node.
virtual void normalize()=0
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes...
virtual bool isIndexed() const =0
Determine if the document is node-order indexed.
virtual const XalanNamedNodeMap * getAttributes() const =0
Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise...
virtual const XalanDOMString & getName() const =0
Returns the name of this attribute.
virtual const XalanDOMString & getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
NodeType
Definition: XalanNode.hpp:53
Definition: XalanElement.hpp:42
virtual void setPrefix(const XalanDOMString &prefix)=0
Set the namespace prefix of this node.
virtual const XalanDOMString & getNodeValue() const =0
Gets the value of this node, depending on its type.
virtual XalanNode * getNextSibling() const =0
Gets the node immediately following this node.
virtual XalanElement * getOwnerElement() const =0
The Element node this attribute is attached to or null if this attribute is not in use...
virtual XalanNode * insertBefore(XalanNode *newChild, XalanNode *refChild)=0
Inserts the node newChild before the existing child node refChild.
virtual XalanNode * getLastChild() const =0
Gets the last child of this node.
virtual const XalanDOMString & getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
virtual void setValue(const XalanDOMString &value)=0
Sets the value of the attribute.
virtual void setNodeValue(const XalanDOMString &nodeValue)=0
Sets the value of the node.
virtual const XalanDOMString & getValue() const =0
Returns the value of the attribute.
#define XALAN_XALANSOURCETREE_EXPORT
Definition: XalanSourceTreeDefinitions.hpp:33
Definition: XalanNamedNodeMap.hpp:42
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
void setIndex(IndexType theIndex)
Definition: XalanSourceTreeAttr.hpp:490
bool operator==(const XalanAttr &theRHS) const
virtual IndexType getIndex() const =0
Get the node's index.
Definition: XalanDocument.hpp:51
Definition: XalanSourceTreeAttr.hpp:50
virtual XalanNode * replaceChild(XalanNode *newChild, XalanNode *oldChild)=0
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node...
virtual const XalanDOMString & getNodeName() const =0
void setOwnerElement(XalanSourceTreeElement *theElement)
Definition: XalanSourceTreeAttr.hpp:484
virtual XalanNode * getParentNode() const =0
Gets the parent of this node.
Definition: XalanDOMString.hpp:42
virtual XalanNode * getFirstChild() const =0
Gets the first child of this node.
virtual const XalanNodeList * getChildNodes() const =0
Gets a NodeList that contains all children of this node.
unsigned long IndexType
Definition: XalanNode.hpp:70
Definition: XalanSourceTreeDocument.hpp:73
Definition: XalanSourceTreeElement.hpp:44
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual XalanNode * removeChild(XalanNode *oldChild)=0
Removes the child node indicated by oldChild from the list of children, and returns it...
virtual bool hasChildNodes() const =0
This is a convenience method to allow easy determination of whether a node has any children...
virtual XalanDocument * getOwnerDocument() const =0
Gets the Document object associated with this node.
virtual XalanNode * getPreviousSibling() const =0
Gets the node immediately preceding this node.
virtual XalanNode * appendChild(XalanNode *newChild)=0
Adds the node newChild to the end of the list of children of this node.
XalanAttr & operator=(const XalanAttr &theSource)

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