[2674] | 1 | /* |
---|
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
---|
| 3 | * contributor license agreements. See the NOTICE file distributed with |
---|
| 4 | * this work for additional information regarding copyright ownership. |
---|
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
| 6 | * (the "License"); you may not use this file except in compliance with |
---|
| 7 | * the License. You may obtain a copy of the License at |
---|
| 8 | * |
---|
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 10 | * |
---|
| 11 | * Unless required by applicable law or agreed to in writing, software |
---|
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 14 | * See the License for the specific language governing permissions and |
---|
| 15 | * limitations under the License. |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | /* |
---|
| 19 | * $Id: DOM_Comment.hpp 568078 2007-08-21 11:43:25Z amassari $ |
---|
| 20 | */ |
---|
| 21 | |
---|
| 22 | #ifndef DOM_Comment_HEADER_GUARD_ |
---|
| 23 | #define DOM_Comment_HEADER_GUARD_ |
---|
| 24 | |
---|
| 25 | #include <xercesc/util/XercesDefs.hpp> |
---|
| 26 | #include "DOM_CharacterData.hpp" |
---|
| 27 | |
---|
| 28 | XERCES_CPP_NAMESPACE_BEGIN |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | class CommentImpl; |
---|
| 32 | |
---|
| 33 | /** |
---|
| 34 | * Class to refer to XML comment nodes in the DOM. |
---|
| 35 | * |
---|
| 36 | * <P>The string value contains all of the characters between |
---|
| 37 | * the starting '<code><!--</code>' and ending '<code>--></code>'. |
---|
| 38 | */ |
---|
| 39 | class DEPRECATED_DOM_EXPORT DOM_Comment: public DOM_CharacterData { |
---|
| 40 | |
---|
| 41 | public: |
---|
| 42 | /** @name Constructors and assignment operators */ |
---|
| 43 | //@{ |
---|
| 44 | /** |
---|
| 45 | * Default constructor for DOM_Comment. The resulting object does not |
---|
| 46 | * refer to an actual Comment node; it will compare == to 0, and is similar |
---|
| 47 | * to a null object reference variable in Java. It may subsequently be |
---|
| 48 | * assigned to refer to an actual comment node. |
---|
| 49 | * <p> |
---|
| 50 | * New comment nodes are created by DOM_Document::createComment(). |
---|
| 51 | * |
---|
| 52 | */ |
---|
| 53 | DOM_Comment(); |
---|
| 54 | |
---|
| 55 | /** |
---|
| 56 | * Copy constructor. Creates a new <code>DOM_Comment</code> that refers to the |
---|
| 57 | * same underlying node as the original. See also DOM_Node::clone(), |
---|
| 58 | * which will copy the actual Comment node, rather than just creating a new |
---|
| 59 | * reference to the original node. |
---|
| 60 | * |
---|
| 61 | * @param other The object to be copied. |
---|
| 62 | */ |
---|
| 63 | DOM_Comment(const DOM_Comment &other); |
---|
| 64 | /** |
---|
| 65 | * Assignment operator. |
---|
| 66 | * |
---|
| 67 | * @param other The object to be copied. |
---|
| 68 | */ |
---|
| 69 | DOM_Comment & operator = (const DOM_Comment &other); |
---|
| 70 | |
---|
| 71 | /** |
---|
| 72 | * Assignment operator. This overloaded variant is provided for |
---|
| 73 | * the sole purpose of setting a DOM_Node reference variable to |
---|
| 74 | * zero. Nulling out a reference variable in this way will decrement |
---|
| 75 | * the reference count on the underlying Node object that the variable |
---|
| 76 | * formerly referenced. This effect is normally obtained when reference |
---|
| 77 | * variable goes out of scope, but zeroing them can be useful for |
---|
| 78 | * global instances, or for local instances that will remain in scope |
---|
| 79 | * for an extended time, when the storage belonging to the underlying |
---|
| 80 | * node needs to be reclaimed. |
---|
| 81 | * |
---|
| 82 | * @param val Only a value of 0, or null, is allowed. |
---|
| 83 | */ |
---|
| 84 | DOM_Comment & operator = (const DOM_NullPtr *val); |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | //@} |
---|
| 89 | /** @name Destructor. */ |
---|
| 90 | //@{ |
---|
| 91 | /** |
---|
| 92 | * Destructor for DOM_Comment. The object being destroyed is the reference |
---|
| 93 | * object, not the underlying Comment node itself. |
---|
| 94 | * |
---|
| 95 | */ |
---|
| 96 | ~DOM_Comment(); |
---|
| 97 | //@} |
---|
| 98 | |
---|
| 99 | protected: |
---|
| 100 | DOM_Comment(CommentImpl *comment); |
---|
| 101 | |
---|
| 102 | friend class DOM_Document; |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | |
---|
| 106 | }; |
---|
| 107 | |
---|
| 108 | XERCES_CPP_NAMESPACE_END |
---|
| 109 | |
---|
| 110 | #endif |
---|
| 111 | |
---|