Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

/home/tommi/cxxtools/include/cxxtools/xml/processinginstruction.h

00001 /*
00002  * This library is free software; you can redistribute it and/or
00003  * modify it under the terms of the GNU Lesser General Public
00004  * License as published by the Free Software Foundation; either
00005  * version 2.1 of the License, or (at your option) any later version.
00006  * 
00007  * As a special exception, you may use this file as part of a free
00008  * software library without restriction. Specifically, if other files
00009  * instantiate templates or use macros or inline functions from this
00010  * file, or you compile this file and link it with other files to
00011  * produce an executable, this file does not by itself cause the
00012  * resulting executable to be covered by the GNU General Public
00013  * License. This exception does not however invalidate any other
00014  * reasons why the executable file might be covered by the GNU Library
00015  * General Public License.
00016  * 
00017  * This library is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  * Lesser General Public License for more details.
00021  * 
00022  * You should have received a copy of the GNU Lesser General Public
00023  * License along with this library; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00025  */
00026 #ifndef CXXTOOLS_xml_ProcessingInstruction_h
00027 #define CXXTOOLS_xml_ProcessingInstruction_h
00028 
00029 #include <cxxtools/xml/api.h>
00030 #include <cxxtools/xml/node.h>
00031 #include <cxxtools/string.h>
00032 
00033 namespace cxxtools {
00034 
00035     namespace xml {
00036 
00050         class CXXTOOLS_XML_API ProcessingInstruction : public Node {
00051             public:
00053                 ProcessingInstruction()
00054                 : Node(Node::ProcessingInstruction)
00055                 { }
00056 
00057                 void clear()
00058                 { _target.clear(); _data.clear(); }
00059 
00064                 ProcessingInstruction* clone() const
00065                 {return new ProcessingInstruction(*this);}
00066 
00074                 const String& target() const
00075                 { return _target; }
00076 
00077                 String& target()
00078                 { return _target; }
00079 
00085                 void setTarget(const String& target)
00086                 { _target = target; }
00087 
00088 
00097                 const String& data() const
00098                 { return _data; }
00099 
00100 
00101                 String& data()
00102                 { return _data; }
00103 
00109                 void setData(const String& data)
00110                 { _data = data; }
00111 
00112             private:
00114                 String _target;
00115 
00117                 String _data;
00118         };
00119 
00120     }
00121 
00122 }
00123 
00124 #endif
Copyright © 2008 The Tntnet Development Team
Tntnet 1.6