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_XMLDecl.hpp 568078 2007-08-21 11:43:25Z amassari $ |
---|
20 | * |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef DOM_XMLDecl_HEADER_GUARD_ |
---|
24 | #define DOM_XMLDecl_HEADER_GUARD_ |
---|
25 | |
---|
26 | #include <xercesc/util/XercesDefs.hpp> |
---|
27 | #include "DOM_Node.hpp" |
---|
28 | |
---|
29 | XERCES_CPP_NAMESPACE_BEGIN |
---|
30 | |
---|
31 | |
---|
32 | class XMLDeclImpl; |
---|
33 | /** |
---|
34 | * Class to refer to XML Declaration nodes in the DOM. |
---|
35 | * |
---|
36 | */ |
---|
37 | class DEPRECATED_DOM_EXPORT DOM_XMLDecl: public DOM_Node { |
---|
38 | |
---|
39 | public: |
---|
40 | /** @name Constructors and assignment operators */ |
---|
41 | //@{ |
---|
42 | /** |
---|
43 | * The default constructor for DOM_XMLDecl creates a null |
---|
44 | * DOM_XMLDecl object that refers to a declaration node with |
---|
45 | * version= 1.0, encoding=utf-8 and standalone=no |
---|
46 | * |
---|
47 | */ |
---|
48 | DOM_XMLDecl(); |
---|
49 | |
---|
50 | /** |
---|
51 | * Copy constructor. Creates a new <code>DOM_XMLDecl</code> that refers to the |
---|
52 | * same underlying actual xmlDecl node as the original. |
---|
53 | * |
---|
54 | * @param other The object to be copied |
---|
55 | */ |
---|
56 | DOM_XMLDecl(const DOM_XMLDecl &other); |
---|
57 | /** |
---|
58 | * Assignment operator |
---|
59 | * |
---|
60 | * @param other The object to be copied |
---|
61 | */ |
---|
62 | DOM_XMLDecl & operator = (const DOM_XMLDecl &other); |
---|
63 | |
---|
64 | /** |
---|
65 | * Assignment operator. This overloaded variant is provided for |
---|
66 | * the sole purpose of setting a DOM_Node reference variable to |
---|
67 | * zero. Nulling out a reference variable in this way will decrement |
---|
68 | * the reference count on the underlying Node object that the variable |
---|
69 | * formerly referenced. This effect is normally obtained when reference |
---|
70 | * variable goes out of scope, but zeroing them can be useful for |
---|
71 | * global instances, or for local instances that will remain in scope |
---|
72 | * for an extended time, when the storage belonging to the underlying |
---|
73 | * node needs to be reclaimed. |
---|
74 | * |
---|
75 | * @param val Only a value of 0, or null, is allowed. |
---|
76 | */ |
---|
77 | DOM_XMLDecl & operator = (const DOM_NullPtr *val); |
---|
78 | |
---|
79 | |
---|
80 | |
---|
81 | //@} |
---|
82 | /** @name Destructor */ |
---|
83 | //@{ |
---|
84 | |
---|
85 | /** |
---|
86 | * Destructor. The object being destroyed is the reference |
---|
87 | * object, not the underlying Document itself. |
---|
88 | * |
---|
89 | * <p>The reference counting memory management will |
---|
90 | * delete the underlying document itself if this |
---|
91 | * DOM_XMLDecl is the last remaining to refer to the Document, |
---|
92 | * and if there are no remaining references to any of the nodes |
---|
93 | * within the document tree. If other live references do remain, |
---|
94 | * the underlying document itself remains also. |
---|
95 | * |
---|
96 | */ |
---|
97 | ~DOM_XMLDecl(); |
---|
98 | |
---|
99 | //@} |
---|
100 | |
---|
101 | //@{ |
---|
102 | |
---|
103 | /** |
---|
104 | * To get the version string of the xmlDeclaration statement |
---|
105 | */ |
---|
106 | DOMString getVersion() const; |
---|
107 | |
---|
108 | /** |
---|
109 | * To get the encoding string of the xmlDeclaration statement |
---|
110 | */ |
---|
111 | DOMString getEncoding() const; |
---|
112 | |
---|
113 | /** |
---|
114 | * To get the standalone string of the xmlDeclaration statement |
---|
115 | */ |
---|
116 | DOMString getStandalone() const; |
---|
117 | |
---|
118 | //@} |
---|
119 | |
---|
120 | protected: |
---|
121 | DOM_XMLDecl( XMLDeclImpl *impl); |
---|
122 | |
---|
123 | friend class DOM_Document; |
---|
124 | |
---|
125 | }; |
---|
126 | |
---|
127 | |
---|
128 | XERCES_CPP_NAMESPACE_END |
---|
129 | |
---|
130 | #endif |
---|