| 1 | #ifndef DOMProcessingInstruction_HEADER_GUARD_ |
|---|
| 2 | #define DOMProcessingInstruction_HEADER_GUARD_ |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | /* |
|---|
| 6 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|---|
| 7 | * contributor license agreements. See the NOTICE file distributed with |
|---|
| 8 | * this work for additional information regarding copyright ownership. |
|---|
| 9 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|---|
| 10 | * (the "License"); you may not use this file except in compliance with |
|---|
| 11 | * the License. You may obtain a copy of the License at |
|---|
| 12 | * |
|---|
| 13 | * http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 14 | * |
|---|
| 15 | * Unless required by applicable law or agreed to in writing, software |
|---|
| 16 | * distributed under the License is distributed on an "AS IS" BASIS, |
|---|
| 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|---|
| 18 | * See the License for the specific language governing permissions and |
|---|
| 19 | * limitations under the License. |
|---|
| 20 | */ |
|---|
| 21 | |
|---|
| 22 | /* |
|---|
| 23 | * $Id: DOMProcessingInstruction.hpp 568078 2007-08-21 11:43:25Z amassari $ |
|---|
| 24 | */ |
|---|
| 25 | |
|---|
| 26 | #include <xercesc/util/XercesDefs.hpp> |
|---|
| 27 | #include <xercesc/dom/DOMNode.hpp> |
|---|
| 28 | |
|---|
| 29 | XERCES_CPP_NAMESPACE_BEGIN |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | /** |
|---|
| 33 | * The <code>DOMProcessingInstruction</code> interface represents a "processing |
|---|
| 34 | * instruction", used in XML as a way to keep processor-specific information |
|---|
| 35 | * in the text of the document. |
|---|
| 36 | * |
|---|
| 37 | * @since DOM Level 1 |
|---|
| 38 | */ |
|---|
| 39 | class CDOM_EXPORT DOMProcessingInstruction: public DOMNode { |
|---|
| 40 | protected: |
|---|
| 41 | // ----------------------------------------------------------------------- |
|---|
| 42 | // Hidden constructors |
|---|
| 43 | // ----------------------------------------------------------------------- |
|---|
| 44 | /** @name Hidden constructors */ |
|---|
| 45 | //@{ |
|---|
| 46 | DOMProcessingInstruction() {} |
|---|
| 47 | DOMProcessingInstruction(const DOMProcessingInstruction &other) : DOMNode(other) {} |
|---|
| 48 | //@} |
|---|
| 49 | |
|---|
| 50 | private: |
|---|
| 51 | // ----------------------------------------------------------------------- |
|---|
| 52 | // Unimplemented constructors and operators |
|---|
| 53 | // ----------------------------------------------------------------------- |
|---|
| 54 | /** @name Unimplemented operators */ |
|---|
| 55 | //@{ |
|---|
| 56 | DOMProcessingInstruction & operator = (const DOMProcessingInstruction &); |
|---|
| 57 | //@} |
|---|
| 58 | |
|---|
| 59 | public: |
|---|
| 60 | // ----------------------------------------------------------------------- |
|---|
| 61 | // All constructors are hidden, just the destructor is available |
|---|
| 62 | // ----------------------------------------------------------------------- |
|---|
| 63 | /** @name Destructor */ |
|---|
| 64 | //@{ |
|---|
| 65 | /** |
|---|
| 66 | * Destructor |
|---|
| 67 | * |
|---|
| 68 | */ |
|---|
| 69 | virtual ~DOMProcessingInstruction() {}; |
|---|
| 70 | //@} |
|---|
| 71 | |
|---|
| 72 | // ----------------------------------------------------------------------- |
|---|
| 73 | // Virtual DOMProcessingInstruction interface |
|---|
| 74 | // ----------------------------------------------------------------------- |
|---|
| 75 | /** @name Functions introduced in DOM Level 1 */ |
|---|
| 76 | //@{ |
|---|
| 77 | // ----------------------------------------------------------------------- |
|---|
| 78 | // Getter methods |
|---|
| 79 | // ----------------------------------------------------------------------- |
|---|
| 80 | /** |
|---|
| 81 | * The target of this processing instruction. |
|---|
| 82 | * |
|---|
| 83 | * XML defines this as being the |
|---|
| 84 | * first token following the markup that begins the processing instruction. |
|---|
| 85 | * |
|---|
| 86 | * @since DOM Level 1 |
|---|
| 87 | */ |
|---|
| 88 | virtual const XMLCh * getTarget() const = 0; |
|---|
| 89 | |
|---|
| 90 | /** |
|---|
| 91 | * The content of this processing instruction. |
|---|
| 92 | * |
|---|
| 93 | * This is from the first non |
|---|
| 94 | * white space character after the target to the character immediately |
|---|
| 95 | * preceding the <code>?></code>. |
|---|
| 96 | * @exception DOMException |
|---|
| 97 | * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. |
|---|
| 98 | * @since DOM Level 1 |
|---|
| 99 | */ |
|---|
| 100 | virtual const XMLCh * getData() const = 0; |
|---|
| 101 | |
|---|
| 102 | // ----------------------------------------------------------------------- |
|---|
| 103 | // Setter methods |
|---|
| 104 | // ----------------------------------------------------------------------- |
|---|
| 105 | /** |
|---|
| 106 | * Sets the content of this processing instruction. |
|---|
| 107 | * |
|---|
| 108 | * This is from the first non |
|---|
| 109 | * white space character after the target to the character immediately |
|---|
| 110 | * preceding the <code>?></code>. |
|---|
| 111 | * @param data The string containing the processing instruction |
|---|
| 112 | * @since DOM Level 1 |
|---|
| 113 | */ |
|---|
| 114 | virtual void setData(const XMLCh * data) = 0; |
|---|
| 115 | //@} |
|---|
| 116 | |
|---|
| 117 | }; |
|---|
| 118 | |
|---|
| 119 | XERCES_CPP_NAMESPACE_END |
|---|
| 120 | |
|---|
| 121 | #endif |
|---|