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

Revision 2674, 4.7 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_ProcessingInstruction.hpp 568078 2007-08-21 11:43:25Z amassari $
20 */
21
22#ifndef DOM_ProcessingInstruction_HEADER_GUARD_
23#define DOM_ProcessingInstruction_HEADER_GUARD_
24
25#include <xercesc/util/XercesDefs.hpp>
26#include "DOM_Node.hpp"
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30
31class ProcessingInstructionImpl;
32
33/**
34 * The <code>ProcessingInstruction</code> interface represents a  "processing
35 * instruction", used in XML as a way to keep processor-specific information
36 * in the text of the document.
37 */
38class  DEPRECATED_DOM_EXPORT DOM_ProcessingInstruction: public DOM_Node {
39public:
40    /** @name Constructors and assignment operator */
41    //@{
42    /**
43      * Default constructor for DOM_ProcessingInstruction.  The resulting object
44      *  does not refer to an actual PI node; it will compare == to 0, and is similar
45      * to a null object reference variable in Java.  It may subsequently be
46      * assigned to refer to an actual PI node.
47      * <p>
48      * New Processing Instruction nodes are created by DOM_Document::createProcessingInstruction().
49      *
50      *
51      */
52    DOM_ProcessingInstruction();
53
54    /**
55      * Copy constructor.  Creates a new <code>DOM_ProcessingInstruction</code> that refers to the
56      * same underlying node as the original.  See also DOM_Node::clone(),
57      * which will copy the actual PI node, rather than just creating a new
58      * reference to the original node.
59      *
60      * @param other The object to be copied.
61      */
62    DOM_ProcessingInstruction(const DOM_ProcessingInstruction &other);
63
64    /**
65      * Assignment operator.
66      *
67      * @param other The object to be copied.
68      */
69    DOM_ProcessingInstruction & operator = (const DOM_ProcessingInstruction &other);
70
71    /**
72      * Assignment operator.  This overloaded variant is provided for
73      *   the sole purpose of setting a DOM_Node reference variable to
74      *   zero.  Nulling out a reference variable in this way will decrement
75      *   the reference count on the underlying Node object that the variable
76      *   formerly referenced.  This effect is normally obtained when reference
77      *   variable goes out of scope, but zeroing them can be useful for
78      *   global instances, or for local instances that will remain in scope
79      *   for an extended time,  when the storage belonging to the underlying
80      *   node needs to be reclaimed.
81      *
82      * @param val   Only a value of 0, or null, is allowed.
83      */
84    DOM_ProcessingInstruction & operator = (const DOM_NullPtr *val);
85
86    //@}
87    /** @name Destructor. */
88    //@{
89         /**
90          * Destructor for DOM_processingInstruction.  The object being destroyed is the reference
91      * object, not the underlying PI node itself.
92          *
93          */
94    ~DOM_ProcessingInstruction();
95
96    //@}
97    /** @name Get functions. */
98    //@{
99    /**
100     * The target of this processing instruction.
101     *
102     * XML defines this as being the
103     * first token following the markup that begins the processing instruction.
104     */
105    DOMString        getTarget() const;
106
107    /**
108     * The content of this processing instruction.
109     *
110     * This is from the first non
111     * white space character after the target to the character immediately
112     * preceding the <code>?&gt;</code>.
113     * @exception DOMException
114     *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
115     */
116    DOMString        getData() const;
117
118    //@}
119    /** @name Set functions. */
120    //@{
121    /**
122    * Sets the content of this processing instruction.
123    *
124    * This is from the first non
125    * white space character after the target to the character immediately
126    * preceding the <code>?&gt;</code>.
127    * @param data The string containing the processing instruction
128    */
129    void             setData(const DOMString &data);
130    //@}
131
132protected:
133    DOM_ProcessingInstruction(ProcessingInstructionImpl *impl);
134
135    friend class DOM_Document;
136
137};
138
139XERCES_CPP_NAMESPACE_END
140
141#endif
142
Note: See TracBrowser for help on using the repository browser.