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

/home/tommi/cxxtools/include/cxxtools/xml/characters.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_Characters_h
00027 #define cxxtools_xml_Characters_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 
00051         class CXXTOOLS_XML_API Characters : public Node
00052         {
00053             public:
00060                 explicit Characters( const String& content = String() )
00061                 : Node(Node::Characters), _content(content)
00062                 { }
00063 
00068                 Characters* clone() const
00069                 { return new Characters(*this); }
00070 
00075                 bool empty() const
00076                 { return _content.empty(); }
00077 
00078                 void clear()
00079                 { _content.clear(); }
00080 
00091                 String& content()
00092                 { return _content; }
00093 
00104                 const String& content() const
00105                 { return _content; }
00106 
00111                 void setContent(const String& content)
00112                 { _content = content; }
00113 
00123                 virtual bool operator==(const Node& node) const;
00124 
00125             private:
00127                 String _content;
00128         };
00129 
00130     }
00131 
00132 }
00133 
00134 #endif
Copyright © 2008 The Tntnet Development Team
Tntnet 1.6