Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanSourceTreeComment.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(XALANSOURCETREECOMMENT_HEADER_GUARD_1357924680)
17 #define XALANSOURCETREECOMMENT_HEADER_GUARD_1357924680
18 
19 
20 
22 
23 
24 
26 
27 
28 
30 
31 
32 
33 XALAN_CPP_NAMESPACE_BEGIN
34 
35 
36 
42 
43 
44 
45 /*
46  * <meta name="usage" content="experimental"/>
47  *
48  * Base class for the Xalan source tree Attr interface.
49  *
50  * This class is experimental and subject to change!!
51  */
52 
54 {
55 public:
56 
60  static void
61  initialize(MemoryManagerType& theManager);
62 
66  static void
67  terminate();
68 
69 
81  const XalanDOMString& theData,
82  XalanSourceTreeDocument* theOwnerDocument,
83  XalanNode* theParentNode = 0,
84  XalanNode* thePreviousSibling = 0,
85  XalanNode* theNextSibling = 0,
86  IndexType theIndex = 0);
87 
88  virtual
90 
91 
95  virtual const XalanDOMString&
96  getNodeName() const;
97 
101  virtual const XalanDOMString&
102  getNodeValue() const;
103 
107  virtual NodeType
108  getNodeType() const;
109 
119  virtual XalanNode*
120  getParentNode() const;
121 
135  virtual const XalanNodeList*
136  getChildNodes() const;
137 
143  virtual XalanNode*
144  getFirstChild() const;
145 
151  virtual XalanNode*
152  getLastChild() const;
153 
159  virtual XalanNode*
160  getPreviousSibling() const;
161 
167  virtual XalanNode*
168  getNextSibling() const;
169 
174  virtual const XalanNamedNodeMap*
175  getAttributes() const;
176 
186  virtual XalanDocument*
187  getOwnerDocument() const;
188 
190 
192 
211 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
212  virtual XalanNode*
213 #else
214  virtual XalanSourceTreeComment*
215 #endif
216  cloneNode(bool deep) const;
217 
219 
221 
238  virtual XalanNode*
239  insertBefore(
240  XalanNode* newChild,
241  XalanNode* refChild);
242 
256  virtual XalanNode*
257  replaceChild(
258  XalanNode* newChild,
259  XalanNode* oldChild);
260 
268  virtual XalanNode*
269  removeChild(XalanNode* oldChild);
270 
282  virtual XalanNode*
283  appendChild(XalanNode* newChild);
284 
286 
288 
296  virtual bool
297  hasChildNodes() const;
298 
299 
301 
303 
317  virtual void
318  setNodeValue(const XalanDOMString& nodeValue);
319 
321 
323 
340  virtual void
341  normalize();
342 
356  virtual bool
357  isSupported(
358  const XalanDOMString& feature,
359  const XalanDOMString& version) const;
360 
374  virtual const XalanDOMString&
375  getNamespaceURI() const;
376 
381  virtual const XalanDOMString&
382  getPrefix() const;
383 
391  virtual const XalanDOMString&
392  getLocalName() const;
393 
423  virtual void
424  setPrefix(const XalanDOMString& prefix);
425 
426  virtual bool
427  isIndexed() const;
428 
429  virtual IndexType
430  getIndex() const;
431 
433 
434  // These interfaces are inherited from XalanCDATASection...
435 
454  virtual const XalanDOMString&
455  getData() const;
456 
464  virtual unsigned int
465  getLength() const;
466 
482  virtual XalanDOMString&
484  unsigned int offset,
485  unsigned int count,
486  XalanDOMString& theBuffer) const;
487 
489 
500  virtual void
501  appendData(const XalanDOMString& arg);
502 
513  virtual void
514  insertData(
515  unsigned int offset,
516  const XalanDOMString& arg);
517 
534  virtual void
535  deleteData(
536  unsigned int offset,
537  unsigned int count);
538 
557  virtual void
558  replaceData(
559  unsigned int offset,
560  unsigned int count,
561  const XalanDOMString& arg);
562 
564 
565 
566  // public interfaces not inherited from XalanComment...
567 
568  void
569  setParent(XalanSourceTreeElement* theParent);
570 
571  void
572  setParent(XalanSourceTreeDocumentFragment* theParent);
573 
574  void
575  setPreviousSibling(XalanSourceTreeComment* thePreviousSibling);
576 
577  void
578  setPreviousSibling(XalanSourceTreeElement* thePreviousSibling);
579 
580  void
581  setPreviousSibling(XalanSourceTreeProcessingInstruction* thePreviousSibling);
582 
583  void
584  setPreviousSibling(XalanSourceTreeText* thePreviousSibling);
585 
586  void
587  appendSiblingNode(XalanSourceTreeComment* theSibling);
588 
589  void
590  appendSiblingNode(XalanSourceTreeElement* theSibling);
591 
592  void
593  appendSiblingNode(XalanSourceTreeProcessingInstruction* theSibling);
594 
595  void
596  appendSiblingNode(XalanSourceTreeText* theSibling);
597 
598  void
599  setIndex(IndexType theIndex)
600  {
601  m_index = theIndex;
602  }
603 
604 protected:
605 
607  const XalanSourceTreeComment& theSource,
608  bool deep = false);
609 
610 private:
611 
612  // Not implemented...
614  operator=(const XalanSourceTreeComment& theSource);
615 
616  bool
617  operator==(const XalanSourceTreeComment& theRHS) const;
618 
619 
620  // Data members...
621  const XalanDOMString& m_data;
622 
623  XalanSourceTreeDocument* m_ownerDocument;
624 
625  XalanNode* m_parentNode;
626 
627  XalanNode* m_previousSibling;
628 
629  XalanNode* m_nextSibling;
630 
631  IndexType m_index;
632 
633  static const XalanDOMString& s_nameString;
634 };
635 
636 
637 
638 XALAN_CPP_NAMESPACE_END
639 
640 
641 
642 #endif // !defined(XALANSOURCETREECOMMENT_HEADER_GUARD_1357924680)
Definition: XalanNode.hpp:44
Definition: XalanNodeList.hpp:42
virtual void replaceData(unsigned int offset, unsigned int count, const XalanDOMString &arg)=0
Replace the characters starting at the specified character offset with the specified string...
virtual bool hasChildNodes() const =0
This is a convenience method to allow easy determination of whether a node has any children...
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
virtual bool isIndexed() const =0
Determine if the document is node-order indexed.
virtual XalanNode * removeChild(XalanNode *oldChild)=0
Removes the child node indicated by oldChild from the list of children, and returns it...
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...
XalanComment & operator=(const XalanComment &theSource)
Definition: XalanComment.hpp:38
virtual XalanDocument * getOwnerDocument() const =0
Gets the Document object associated with this node.
NodeType
Definition: XalanNode.hpp:53
virtual const XalanDOMString & getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual XalanNode * getLastChild() const =0
Gets the last child of this node.
virtual const XalanNamedNodeMap * getAttributes() const =0
Gets a NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise...
bool operator==(const XalanComment &theRHS) const
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...
virtual const XalanDOMString & getNodeName() const =0
virtual XalanNode * getFirstChild() const =0
Gets the first child of this node.
Definition: XalanSourceTreeDocumentFragment.hpp:49
#define XALAN_XALANSOURCETREE_EXPORT
Definition: XalanSourceTreeDefinitions.hpp:33
Definition: XalanNamedNodeMap.hpp:42
virtual void appendData(const XalanDOMString &arg)=0
Append the string to the end of the character data of the node.
virtual XalanNode * getNextSibling() const =0
Gets the node immediately following this node.
virtual unsigned int getLength() const =0
Returns the number of characters that are available through data and the substringData method below...
virtual XalanComment * cloneNode(bool deep) const =0
Returns a duplicate of this node.
virtual XalanDOMString & substringData(unsigned int offset, unsigned int count, XalanDOMString &theResult) const =0
Extracts a range of data from the node.
Definition: XalanSourceTreeText.hpp:44
virtual void insertData(unsigned int offset, const XalanDOMString &arg)=0
Insert a string at the specified character offset.
virtual const XalanDOMString & getNodeValue() const =0
Gets the value of this node, depending on its type.
Definition: XalanDocument.hpp:51
virtual XalanNode * getParentNode() const =0
Gets the parent of this node.
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
virtual void setPrefix(const XalanDOMString &prefix)=0
Set the namespace prefix of this node.
virtual IndexType getIndex() const =0
Get the node's index.
virtual XalanNode * insertBefore(XalanNode *newChild, XalanNode *refChild)=0
Inserts the node newChild before the existing child node refChild.
virtual XalanNode * getPreviousSibling() const =0
Gets the node immediately preceding this node.
Definition: XalanDOMString.hpp:42
virtual XalanNode * appendChild(XalanNode *newChild)=0
Adds the node newChild to the end of the list of children of this node.
virtual const XalanDOMString & getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
virtual const XalanDOMString & getData() const =0
Returns the character data of the node that implements this interface.
unsigned long IndexType
Definition: XalanNode.hpp:70
Definition: XalanSourceTreeDocument.hpp:73
virtual void normalize()=0
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes...
Definition: XalanSourceTreeElement.hpp:44
void setIndex(IndexType theIndex)
Definition: XalanSourceTreeComment.hpp:599
virtual void deleteData(unsigned int offset, unsigned int count)=0
Remove a range of characters from the node.
Definition: XalanSourceTreeProcessingInstruction.hpp:45
Definition: XalanSourceTreeComment.hpp:53
virtual const XalanNodeList * getChildNodes() const =0
Gets a NodeList that contains all children of this node.
virtual void setNodeValue(const XalanDOMString &nodeValue)=0
Sets the value of the node.

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