|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 /* |
|
18 * Licensed to the Apache Software Foundation (ASF) under one or more |
|
19 * contributor license agreements. See the NOTICE file distributed with |
|
20 * this work for additional information regarding copyright ownership. |
|
21 * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
22 * (the "License"); you may not use this file except in compliance with |
|
23 * the License. You may obtain a copy of the License at |
|
24 * |
|
25 * http://www.apache.org/licenses/LICENSE-2.0 |
|
26 * |
|
27 * Unless required by applicable law or agreed to in writing, software |
|
28 * distributed under the License is distributed on an "AS IS" BASIS, |
|
29 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
30 * See the License for the specific language governing permissions and |
|
31 * limitations under the License. |
|
32 */ |
|
33 |
|
34 /* |
|
35 * $Id: DOM_CDATASection.hpp 568078 2007-08-21 11:43:25Z amassari $ |
|
36 */ |
|
37 |
|
38 #ifndef DOM_CDataSection_HEADER_GUARD_ |
|
39 #define DOM_CDataSection_HEADER_GUARD_ |
|
40 |
|
41 #include <xercesc/util/XercesDefs.hpp> |
|
42 #include "DOM_Text.hpp" |
|
43 |
|
44 XERCES_CPP_NAMESPACE_BEGIN |
|
45 |
|
46 |
|
47 class CDATASectionImpl; |
|
48 |
|
49 /** |
|
50 * <code>DOM_CDataSection</code> objects refer to the data from an |
|
51 * XML CDATA section. These are used to escape blocks of text containing characters |
|
52 * that would otherwise be regarded as markup. |
|
53 * |
|
54 * <p>Note that the string data associated with the CDATA section may |
|
55 * contain characters that need to be escaped when appearing in an |
|
56 * XML document outside of a CDATA section. |
|
57 * <p> The <code>DOM_CDATASection</code> class inherits from the |
|
58 * <code>DOM_CharacterData</code> class through the <code>Text</code> |
|
59 * interface. Adjacent CDATASection nodes are not merged by use |
|
60 * of the Element.normalize() method. |
|
61 */ |
|
62 class DEPRECATED_DOM_EXPORT DOM_CDATASection: public DOM_Text { |
|
63 public: |
|
64 /** @name Constructors and assignment operators */ |
|
65 //@{ |
|
66 /** |
|
67 * Default constructor for DOM_CDATASection. The resulting object does not |
|
68 * refer to any actual CData section; it will compare == to 0, and is similar |
|
69 * to a null object reference variable in Java. |
|
70 * |
|
71 */ |
|
72 DOM_CDATASection(); |
|
73 /** |
|
74 * Copy constructor. Creates a new <code>DOM_CDataSection</code> that refers to the |
|
75 * same underlying data as the original. See also <code>DOM_Node::clone()</code>, |
|
76 * which will copy the underlying data, rather than just creating a new |
|
77 * reference to the original object. |
|
78 * |
|
79 * @param other The source <code>DOM_CDATASection</code> object |
|
80 */ |
|
81 DOM_CDATASection(const DOM_CDATASection &other); |
|
82 |
|
83 /** |
|
84 * Assignment operator. |
|
85 * |
|
86 * @param other The object to be copied. |
|
87 */ |
|
88 DOM_CDATASection & operator = (const DOM_CDATASection &other); |
|
89 |
|
90 /** |
|
91 * Assignment operator. This overloaded variant is provided for |
|
92 * the sole purpose of setting a DOM_Node reference variable to |
|
93 * zero. Nulling out a reference variable in this way will decrement |
|
94 * the reference count on the underlying Node object that the variable |
|
95 * formerly referenced. This effect is normally obtained when reference |
|
96 * variable goes out of scope, but zeroing them can be useful for |
|
97 * global instances, or for local instances that will remain in scope |
|
98 * for an extended time, when the storage belonging to the underlying |
|
99 * node needs to be reclaimed. |
|
100 * |
|
101 * @param val Only a value of 0, or null, is allowed. |
|
102 */ |
|
103 DOM_CDATASection & operator = (const DOM_NullPtr *val); |
|
104 |
|
105 |
|
106 //@} |
|
107 /** @name Destructor. */ |
|
108 //@{ |
|
109 /** |
|
110 * Destructor for DOM_CDATASection. |
|
111 * |
|
112 */ |
|
113 |
|
114 ~DOM_CDATASection(); |
|
115 //@} |
|
116 |
|
117 |
|
118 protected: |
|
119 DOM_CDATASection(CDATASectionImpl *); |
|
120 |
|
121 friend class DOM_Document; |
|
122 |
|
123 }; |
|
124 |
|
125 XERCES_CPP_NAMESPACE_END |
|
126 |
|
127 #endif |
|
128 |
|
129 |