source: NonGTP/Xerces/xerces/include/xercesc/dom/deprecated/DOM_EntityReference.hpp @ 358

Revision 358, 3.6 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
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_EntityReference.hpp,v 1.5 2004/09/08 13:55:42 peiyongz Exp $
19 */
20
21#ifndef DOM_EntityReference_HEADER_GUARD_
22#define DOM_EntityReference_HEADER_GUARD_
23
24#include <xercesc/util/XercesDefs.hpp>
25#include "DOM_Node.hpp"
26
27XERCES_CPP_NAMESPACE_BEGIN
28
29
30class EntityReferenceImpl;
31
32/**
33 * <code>EntityReference</code> nodes will appear in the structure
34 * model when an entity reference is in the source document, or when the user
35 * wishes to insert an entity reference.
36 *
37 * The expansion of the entity will appear as child nodes of the entity
38 * reference node.  The expansion may be just simple text, or it may
39 * be more complex, containing additional entity refs.
40 *
41*/
42
43class DEPRECATED_DOM_EXPORT DOM_EntityReference: public DOM_Node {
44public:
45    /** @name Constructors and assignment operator */
46    //@{
47    /**
48      * Default constructor for DOM_EntityReference.  The resulting object does not
49    * refer to an actual Entity Reference node; it will compare == to 0, and is similar
50    * to a null object reference variable in Java.  It may subsequently be
51    * assigned to refer to an actual entity reference node.
52    * <p>
53    * New entity reference nodes are created by DOM_Document::createEntityReference().
54      *
55      */
56    DOM_EntityReference();
57
58    /**
59      * Copy constructor.  Creates a new <code>DOM_EntityReference</code> that refers to the
60    * same underlying node as the original.
61      *
62      * @param other The object to be copied.
63      */
64    DOM_EntityReference(const DOM_EntityReference &other);
65
66    /**
67      * Assignment operator.
68      *
69      * @param other The object to be copied.
70      */
71    DOM_EntityReference & operator = (const DOM_EntityReference &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_EntityReference & operator = (const DOM_NullPtr *val);
87
88    //@}
89    /** @name Destructor. */
90    //@{
91         /**
92          * Destructor for DOM_EntityReference.  The object being destroyed is the reference
93      * object, not the underlying entity reference node itself.
94          *
95          */
96    ~DOM_EntityReference();
97    //@}
98
99protected:
100    DOM_EntityReference(EntityReferenceImpl *impl);
101
102    friend class DOM_Document;
103};
104
105XERCES_CPP_NAMESPACE_END
106
107#endif
108
109
Note: See TracBrowser for help on using the repository browser.