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