processinginstruction.h
Go to the documentation of this file.
1 /*
2  * This library is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU Lesser General Public
4  * License as published by the Free Software Foundation; either
5  * version 2.1 of the License, or (at your option) any later version.
6  *
7  * As a special exception, you may use this file as part of a free
8  * software library without restriction. Specifically, if other files
9  * instantiate templates or use macros or inline functions from this
10  * file, or you compile this file and link it with other files to
11  * produce an executable, this file does not by itself cause the
12  * resulting executable to be covered by the GNU General Public
13  * License. This exception does not however invalidate any other
14  * reasons why the executable file might be covered by the GNU Library
15  * General Public License.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25  */
26 #ifndef CXXTOOLS_xml_ProcessingInstruction_h
27 #define CXXTOOLS_xml_ProcessingInstruction_h
28 
29 #include <cxxtools/xml/node.h>
30 #include <cxxtools/string.h>
31 
32 namespace cxxtools {
33 
34  namespace xml {
35 
49  class ProcessingInstruction : public Node {
50  public:
54  { }
55 
56  void clear()
57  { _target.clear(); _data.clear(); }
58 
64  {return new ProcessingInstruction(*this);}
65 
73  const String& target() const
74  { return _target; }
75 
77  { return _target; }
78 
84  void setTarget(const String& target)
85  { _target = target; }
86 
87 
96  const String& data() const
97  { return _data; }
98 
99 
101  { return _data; }
102 
108  void setData(const String& data)
109  { _data = data; }
110 
111  private:
113  String _target;
114 
116  String _data;
117  };
118 
119  }
120 
121 }
122 
123 #endif