Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanSourceTreeText.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(XALANSOURCETREETEXT_HEADER_GUARD_1357924680)
17 #define XALANSOURCETREETEXT_HEADER_GUARD_1357924680
18 
19 
20 
22 
23 
24 
26 
27 
28 
30 
31 
32 
33 XALAN_CPP_NAMESPACE_BEGIN
34 
35 
36 
41 
42 
43 
45 {
46 public:
47 
51  static void
52  initialize(MemoryManagerType& theManager);
53 
57  static void
58  terminate();
59 
71  const XalanDOMString& theData,
72  XalanNode* theParentNode = 0,
73  XalanNode* thePreviousSibling = 0,
74  XalanNode* theNextSibling = 0,
75  IndexType theIndex = 0);
76 
77  virtual
79 
80 
84  virtual const XalanDOMString&
85  getNodeName() const;
86 
90  virtual const XalanDOMString&
91  getNodeValue() const;
92 
96  virtual NodeType
97  getNodeType() const;
98 
108  virtual XalanNode*
109  getParentNode() const;
110 
124  virtual const XalanNodeList*
125  getChildNodes() const;
126 
132  virtual XalanNode*
133  getFirstChild() const;
134 
140  virtual XalanNode*
141  getLastChild() const;
142 
148  virtual XalanNode*
149  getPreviousSibling() const;
150 
156  virtual XalanNode*
157  getNextSibling() const;
158 
163  virtual const XalanNamedNodeMap*
164  getAttributes() const;
165 
175  virtual XalanDocument*
176  getOwnerDocument() const;
177 
179 
181 
200 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
201  virtual XalanNode*
202 #else
203  virtual XalanSourceTreeText*
204 #endif
205  cloneNode(bool deep) const;
206 
208 
210 
227  virtual XalanNode*
228  insertBefore(
229  XalanNode* newChild,
230  XalanNode* refChild);
231 
245  virtual XalanNode*
246  replaceChild(
247  XalanNode* newChild,
248  XalanNode* oldChild);
249 
257  virtual XalanNode*
258  removeChild(XalanNode* oldChild);
259 
271  virtual XalanNode*
272  appendChild(XalanNode* newChild);
273 
275 
277 
285  virtual bool
286  hasChildNodes() const;
287 
288 
290 
292 
293 
307  virtual void
308  setNodeValue(const XalanDOMString& nodeValue);
309 
311 
313 
330  virtual void
331  normalize();
332 
346  virtual bool
347  isSupported(
348  const XalanDOMString& feature,
349  const XalanDOMString& version) const;
350 
364  virtual const XalanDOMString&
365  getNamespaceURI() const;
366 
371  virtual const XalanDOMString&
372  getPrefix() const;
373 
381  virtual const XalanDOMString&
382  getLocalName() const;
383 
413  virtual void
414  setPrefix(const XalanDOMString& prefix);
415 
416  virtual bool
417  isIndexed() const;
418 
419  virtual IndexType
420  getIndex() const;
421 
423 
424  // These interfaces are inherited from XalanCDATASection...
425 
444  virtual const XalanDOMString&
445  getData() const;
446 
454  virtual unsigned int
455  getLength() const;
456 
472  virtual XalanDOMString&
474  unsigned int offset,
475  unsigned int count,
476  XalanDOMString& theResult) const;
477 
479 
490  virtual void
491  appendData(const XalanDOMString& arg);
492 
503  virtual void
504  insertData(
505  unsigned int offset,
506  const XalanDOMString& arg);
507 
524  virtual void
525  deleteData(
526  unsigned int offset,
527  unsigned int count);
528 
547  virtual void
548  replaceData(
549  unsigned int offset,
550  unsigned int count,
551  const XalanDOMString& arg);
552 
554 
556 
558 
576  virtual XalanText*
577  splitText(unsigned int offset);
578 
580 
581  virtual bool
582  isIgnorableWhitespace() const;
583 
584 
585  // public interfaces not inherited from XalanCDATASection...
586 
587  void
588  setParent(XalanSourceTreeElement* theParent);
589 
590  void
591  setParent(XalanSourceTreeDocumentFragment* theParent);
592 
593  void
594  setPreviousSibling(XalanSourceTreeComment* thePreviousSibling);
595 
596  void
597  setPreviousSibling(XalanSourceTreeElement* thePreviousSibling);
598 
599  void
600  setPreviousSibling(XalanSourceTreeProcessingInstruction* thePreviousSibling);
601 
602  void
603  setPreviousSibling(XalanSourceTreeText* thePreviousSibling);
604 
605  void
606  appendSiblingNode(XalanSourceTreeComment* theSibling);
607 
608  void
609  appendSiblingNode(XalanSourceTreeElement* theSibling);
610 
611  void
612  appendSiblingNode(XalanSourceTreeProcessingInstruction* theSibling);
613 
614  void
615  appendSiblingNode(XalanSourceTreeText* theSibling);
616 
617  void
618  setIndex(IndexType theIndex)
619  {
620  m_index = theIndex;
621  }
622 
623 protected:
624 
626  const XalanSourceTreeText& theSource,
627  bool /* deep */);
628 
629 private:
630 
631  // Not implemented...
633  operator=(const XalanSourceTreeText& theSource);
634 
635  bool
636  operator==(const XalanSourceTreeText& theRHS) const;
637 
638 
639  // Data members...
640  const XalanDOMString& m_data;
641 
642  XalanNode* m_parentNode;
643 
644  XalanNode* m_previousSibling;
645 
646  XalanNode* m_nextSibling;
647 
648  IndexType m_index;
649 
650  static const XalanDOMString& s_nameString;
651 };
652 
653 
654 
655 XALAN_CPP_NAMESPACE_END
656 
657 
658 
659 #endif // !defined(XALANSOURCETREETEXT_HEADER_GUARD_1357924680)
virtual unsigned int getLength() const =0
Returns the number of characters that are available through data and the substringData method below...
virtual const XalanDOMString & getNodeName() const =0
virtual const XalanDOMString & getNamespaceURI() const =0
Get the namespace URI of this node, or null if it is unspecified.
virtual NodeType getNodeType() const =0
An enum value representing the type of the underlying object.
virtual const XalanDOMString & getPrefix() const =0
Get the namespace prefix of this node, or null if it is unspecified.
Definition: XalanNode.hpp:44
Definition: XalanNodeList.hpp:42
virtual XalanDocument * getOwnerDocument() const =0
Gets the Document object associated with this node.
Definition: XalanText.hpp:38
virtual void normalize()=0
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes...
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.
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
virtual XalanNode * getNextSibling() const =0
Gets the node immediately following this node.
virtual const XalanDOMString & getLocalName() const =0
Returns the local part of the qualified name of this node.
virtual XalanNode * getPreviousSibling() const =0
Gets the node immediately preceding this node.
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 XalanText * splitText(unsigned int offset)=0
Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings...
NodeType
Definition: XalanNode.hpp:53
virtual const XalanNodeList * getChildNodes() const =0
Gets a NodeList that contains all children 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...
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 XalanNode * getFirstChild() const =0
Gets the first child of this node.
virtual XalanText * cloneNode(bool deep) const =0
Returns a duplicate of this node.
Definition: XalanSourceTreeDocumentFragment.hpp:49
void setIndex(IndexType theIndex)
Definition: XalanSourceTreeText.hpp:618
#define XALAN_XALANSOURCETREE_EXPORT
Definition: XalanSourceTreeDefinitions.hpp:33
Definition: XalanNamedNodeMap.hpp:42
virtual IndexType getIndex() const =0
Get the node's index.
virtual void deleteData(unsigned int offset, unsigned int count)=0
Remove a range of characters from the node.
virtual XalanNode * appendChild(XalanNode *newChild)=0
Adds the node newChild to the end of the list of children of this node.
Definition: XalanSourceTreeText.hpp:44
virtual bool hasChildNodes() const =0
This is a convenience method to allow easy determination of whether a node has any children...
Definition: XalanDocument.hpp:51
virtual XalanNode * getParentNode() const =0
Gets the parent of this node.
virtual XalanDOMString & substringData(unsigned int offset, unsigned int count, XalanDOMString &theResult) const =0
Extracts a range of data from the node.
virtual void appendData(const XalanDOMString &arg)=0
Append the string to the end of the character data of the node.
virtual const XalanDOMString & getData() const =0
Returns the character data of the node that implements this interface.
virtual bool isIgnorableWhitespace() const =0
Determine whether the text node instance is composed entirely of XML whitespace.
virtual void insertData(unsigned int offset, const XalanDOMString &arg)=0
Insert a string at the specified character offset.
bool operator==(const XalanText &theRHS) const
virtual XalanNode * removeChild(XalanNode *oldChild)=0
Removes the child node indicated by oldChild from the list of children, and returns it...
Definition: XalanDOMString.hpp:42
virtual bool isIndexed() const =0
Determine if the document is node-order indexed.
unsigned long IndexType
Definition: XalanNode.hpp:70
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: XalanSourceTreeElement.hpp:44
XalanText & operator=(const XalanText &theSource)
virtual void setNodeValue(const XalanDOMString &nodeValue)=0
Sets the value of the node.
virtual XalanNode * getLastChild() const =0
Gets the last child of this node.
Definition: XalanSourceTreeProcessingInstruction.hpp:45
Definition: XalanSourceTreeComment.hpp:53
virtual XalanNode * insertBefore(XalanNode *newChild, XalanNode *refChild)=0
Inserts the node newChild before the existing child node refChild.

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