Xalan-C++ API Reference  1.12.0
XalanSourceTreeProcessingInstruction.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(XALANSOURCETREEPROCESSINGINSTRUCTION_HEADER_GUARD_1357924680)
19 #define XALANSOURCETREEPROCESSINGINSTRUCTION_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 XalanSourceTreeComment;
40 class XalanSourceTreeDocument;
41 class XalanSourceTreeDocumentFragment;
42 class XalanSourceTreeElement;
43 class XalanSourceTreeText;
44 
45 
46 
48 {
49 public:
50 
51  /**
52  * Create an instance.
53  *
54  * @param theTarget The target for the processing instruction.
55  * @param theData The data for the node
56  * @param theOwnerDocument The document that owns the instance.
57  * @param theParentNode The parent node, if any.
58  * @param thePreviousSibling The next sibling, if any.
59  * @param theNextSibling The next sibling, if any.
60  * @param theIndex The document-order index of the node.
61  *
62  * @return pointer to the instance
63  */
65  const XalanDOMString& theTarget,
66  const XalanDOMString& theData,
67  XalanSourceTreeDocument* theOwnerDocument,
68  XalanNode* theParentNode = 0,
69  XalanNode* thePreviousSibling = 0,
70  XalanNode* theNextSibling = 0,
71  IndexType theIndex = 0);
72 
73  virtual
75 
76 
77  // These interfaces are inherited from XalanProcessingInstruction...
78 
79  virtual const XalanDOMString&
80  getNodeName() const;
81 
82  virtual const XalanDOMString&
83  getNodeValue() const;
84 
85  virtual NodeType
86  getNodeType() const;
87 
88  virtual XalanNode*
89  getParentNode() const;
90 
91  virtual const XalanNodeList*
92  getChildNodes() const;
93 
94  virtual XalanNode*
95  getFirstChild() const;
96 
97  virtual XalanNode*
98  getLastChild() const;
99 
100  virtual XalanNode*
101  getPreviousSibling() const;
102 
103  virtual XalanNode*
104  getNextSibling() const;
105 
106  virtual const XalanNamedNodeMap*
107  getAttributes() const;
108 
109  virtual XalanDocument*
110  getOwnerDocument() const;
111 
112  virtual const XalanDOMString&
113  getNamespaceURI() const;
114 
115  virtual const XalanDOMString&
116  getPrefix() const;
117 
118  virtual const XalanDOMString&
119  getLocalName() const;
120 
121  virtual bool
122  isIndexed() const;
123 
124  virtual IndexType
125  getIndex() const;
126 
127  virtual const XalanDOMString&
128  getTarget() const;
129 
130  virtual const XalanDOMString&
131  getData() const;
132 
133 
134  // public interfaces not inherited from XalanProcessingInstruction...
135 
136  void
137  setParent(XalanSourceTreeElement* theParent);
138 
139  void
140  setParent(XalanSourceTreeDocumentFragment* theParent);
141 
142  void
143  setPreviousSibling(XalanSourceTreeComment* thePreviousSibling);
144 
145  void
146  setPreviousSibling(XalanSourceTreeElement* thePreviousSibling);
147 
148  void
149  setPreviousSibling(XalanSourceTreeProcessingInstruction* thePreviousSibling);
150 
151  void
152  setPreviousSibling(XalanSourceTreeText* thePreviousSibling);
153 
154  void
155  appendSiblingNode(XalanSourceTreeComment* theSibling);
156 
157  void
158  appendSiblingNode(XalanSourceTreeElement* theSibling);
159 
160  void
161  appendSiblingNode(XalanSourceTreeProcessingInstruction* theSibling);
162 
163  void
164  appendSiblingNode(XalanSourceTreeText* theSibling);
165 
166  void
167  setIndex(IndexType theIndex)
168  {
169  m_index = theIndex;
170  }
171 
172 private:
173 
174  // Not implemented...
176  const XalanSourceTreeProcessingInstruction& theSource);
177 
179  operator=(const XalanSourceTreeProcessingInstruction& theSource);
180 
181  bool
183 
184 
185  // Data members...
186  const XalanDOMString& m_target;
187 
188  const XalanDOMString& m_data;
189 
190  XalanSourceTreeDocument* m_ownerDocument;
191 
192  XalanNode* m_parentNode;
193 
194  XalanNode* m_previousSibling;
195 
196  XalanNode* m_nextSibling;
197 
198  IndexType m_index;
199 };
200 
201 
202 
203 }
204 
205 
206 
207 #endif // !defined(XALANSOURCETREEPROCESSINGINSTRUCTION_HEADER_GUARD_1357924680)
XalanProcessingInstruction.hpp
xalanc::XalanSourceTreeDocumentFragment
Definition: XalanSourceTreeDocumentFragment.hpp:49
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
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
xalanc::XalanSourceTreeComment
Definition: XalanSourceTreeComment.hpp:47
xalanc::XalanNodeList
Definition: XalanNodeList.hpp:36
XalanSourceTreeDefinitions.hpp
xalanc::XalanSourceTreeProcessingInstruction::setIndex
void setIndex(IndexType theIndex)
Definition: XalanSourceTreeProcessingInstruction.hpp:167
xalanc::XalanNamedNodeMap
Definition: XalanNamedNodeMap.hpp:36
xalanc::XalanSourceTreeText
Definition: XalanSourceTreeText.hpp:46
XALAN_XALANSOURCETREE_EXPORT
#define XALAN_XALANSOURCETREE_EXPORT
Definition: XalanSourceTreeDefinitions.hpp:35
xalanc::XalanSourceTreeElement
Definition: XalanSourceTreeElement.hpp:46
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::XalanSourceTreeDocument
Definition: XalanSourceTreeDocument.hpp:78
xalanc::XalanProcessingInstruction
Definition: XalanProcessingInstruction.hpp:32
xalanc::XalanSourceTreeProcessingInstruction
Definition: XalanSourceTreeProcessingInstruction.hpp:47