source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/dom/deprecated/DOM_EntityReference.hpp @ 2674

Revision 2674, 3.6 KB checked in by mattausch, 16 years ago (diff)
Line 
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_EntityReference.hpp 568078 2007-08-21 11:43:25Z amassari $
20 */
21
22#ifndef DOM_EntityReference_HEADER_GUARD_
23#define DOM_EntityReference_HEADER_GUARD_
24
25#include <xercesc/util/XercesDefs.hpp>
26#include "DOM_Node.hpp"
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30
31class EntityReferenceImpl;
32
33/**
34 * <code>EntityReference</code> nodes will appear in the structure
35 * model when an entity reference is in the source document, or when the user
36 * wishes to insert an entity reference.
37 *
38 * The expansion of the entity will appear as child nodes of the entity
39 * reference node.  The expansion may be just simple text, or it may
40 * be more complex, containing additional entity refs.
41 *
42*/
43
44class DEPRECATED_DOM_EXPORT DOM_EntityReference: public DOM_Node {
45public:
46    /** @name Constructors and assignment operator */
47    //@{
48    /**
49      * Default constructor for DOM_EntityReference.  The resulting object does not
50    * refer to an actual Entity Reference node; it will compare == to 0, and is similar
51    * to a null object reference variable in Java.  It may subsequently be
52    * assigned to refer to an actual entity reference node.
53    * <p>
54    * New entity reference nodes are created by DOM_Document::createEntityReference().
55      *
56      */
57    DOM_EntityReference();
58
59    /**
60      * Copy constructor.  Creates a new <code>DOM_EntityReference</code> that refers to the
61    * same underlying node as the original.
62      *
63      * @param other The object to be copied.
64      */
65    DOM_EntityReference(const DOM_EntityReference &other);
66
67    /**
68      * Assignment operator.
69      *
70      * @param other The object to be copied.
71      */
72    DOM_EntityReference & operator = (const DOM_EntityReference &other);
73
74    /**
75      * Assignment operator.  This overloaded variant is provided for
76      *   the sole purpose of setting a DOM_Node reference variable to
77      *   zero.  Nulling out a reference variable in this way will decrement
78      *   the reference count on the underlying Node object that the variable
79      *   formerly referenced.  This effect is normally obtained when reference
80      *   variable goes out of scope, but zeroing them can be useful for
81      *   global instances, or for local instances that will remain in scope
82      *   for an extended time,  when the storage belonging to the underlying
83      *   node needs to be reclaimed.
84      *
85      * @param val   Only a value of 0, or null, is allowed.
86      */
87    DOM_EntityReference & operator = (const DOM_NullPtr *val);
88
89    //@}
90    /** @name Destructor. */
91    //@{
92         /**
93          * Destructor for DOM_EntityReference.  The object being destroyed is the reference
94      * object, not the underlying entity reference node itself.
95          *
96          */
97    ~DOM_EntityReference();
98    //@}
99
100protected:
101    DOM_EntityReference(EntityReferenceImpl *impl);
102
103    friend class DOM_Document;
104};
105
106XERCES_CPP_NAMESPACE_END
107
108#endif
109
110
Note: See TracBrowser for help on using the repository browser.