1 | /*
|
---|
2 | * Copyright 1999-2002,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 |
|
---|
17 | /*
|
---|
18 | * $Id: DOM_CDATASection.hpp,v 1.5 2004/09/08 13:55:42 peiyongz Exp $
|
---|
19 | */
|
---|
20 |
|
---|
21 | #ifndef DOM_CDataSection_HEADER_GUARD_
|
---|
22 | #define DOM_CDataSection_HEADER_GUARD_
|
---|
23 |
|
---|
24 | #include <xercesc/util/XercesDefs.hpp>
|
---|
25 | #include "DOM_Text.hpp"
|
---|
26 |
|
---|
27 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
28 |
|
---|
29 |
|
---|
30 | class CDATASectionImpl;
|
---|
31 |
|
---|
32 | /**
|
---|
33 | * <code>DOM_CDataSection</code> objects refer to the data from an
|
---|
34 | * XML CDATA section. These are used to escape blocks of text containing characters
|
---|
35 | * that would otherwise be regarded as markup.
|
---|
36 | *
|
---|
37 | * <p>Note that the string data associated with the CDATA section may
|
---|
38 | * contain characters that need to be escaped when appearing in an
|
---|
39 | * XML document outside of a CDATA section.
|
---|
40 | * <p> The <code>DOM_CDATASection</code> class inherits from the
|
---|
41 | * <code>DOM_CharacterData</code> class through the <code>Text</code>
|
---|
42 | * interface. Adjacent CDATASection nodes are not merged by use
|
---|
43 | * of the Element.normalize() method.
|
---|
44 | */
|
---|
45 | class DEPRECATED_DOM_EXPORT DOM_CDATASection: public DOM_Text {
|
---|
46 | public:
|
---|
47 | /** @name Constructors and assignment operators */
|
---|
48 | //@{
|
---|
49 | /**
|
---|
50 | * Default constructor for DOM_CDATASection. The resulting object does not
|
---|
51 | * refer to any actual CData section; it will compare == to 0, and is similar
|
---|
52 | * to a null object reference variable in Java.
|
---|
53 | *
|
---|
54 | */
|
---|
55 | DOM_CDATASection();
|
---|
56 | /**
|
---|
57 | * Copy constructor. Creates a new <code>DOM_CDataSection</code> that refers to the
|
---|
58 | * same underlying data as the original. See also <code>DOM_Node::clone()</code>,
|
---|
59 | * which will copy the underlying data, rather than just creating a new
|
---|
60 | * reference to the original object.
|
---|
61 | *
|
---|
62 | * @param other The source <code>DOM_CDATASection</code> object
|
---|
63 | */
|
---|
64 | DOM_CDATASection(const DOM_CDATASection &other);
|
---|
65 |
|
---|
66 | /**
|
---|
67 | * Assignment operator.
|
---|
68 | *
|
---|
69 | * @param other The object to be copied.
|
---|
70 | */
|
---|
71 | DOM_CDATASection & operator = (const DOM_CDATASection &other);
|
---|
72 |
|
---|
73 | /**
|
---|
74 | * Assignment operator. This overloaded variant is provided for
|
---|
75 | * the sole purpose of setting a DOM_Node reference variable to
|
---|
76 | * zero. Nulling out a reference variable in this way will decrement
|
---|
77 | * the reference count on the underlying Node object that the variable
|
---|
78 | * formerly referenced. This effect is normally obtained when reference
|
---|
79 | * variable goes out of scope, but zeroing them can be useful for
|
---|
80 | * global instances, or for local instances that will remain in scope
|
---|
81 | * for an extended time, when the storage belonging to the underlying
|
---|
82 | * node needs to be reclaimed.
|
---|
83 | *
|
---|
84 | * @param val Only a value of 0, or null, is allowed.
|
---|
85 | */
|
---|
86 | DOM_CDATASection & operator = (const DOM_NullPtr *val);
|
---|
87 |
|
---|
88 |
|
---|
89 | //@}
|
---|
90 | /** @name Destructor. */
|
---|
91 | //@{
|
---|
92 | /**
|
---|
93 | * Destructor for DOM_CDATASection.
|
---|
94 | *
|
---|
95 | */
|
---|
96 |
|
---|
97 | ~DOM_CDATASection();
|
---|
98 | //@}
|
---|
99 |
|
---|
100 |
|
---|
101 | protected:
|
---|
102 | DOM_CDATASection(CDATASectionImpl *);
|
---|
103 |
|
---|
104 | friend class DOM_Document;
|
---|
105 |
|
---|
106 | };
|
---|
107 |
|
---|
108 | XERCES_CPP_NAMESPACE_END
|
---|
109 |
|
---|
110 | #endif
|
---|
111 |
|
---|
112 |
|
---|