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_EndElement_h 00027 #define cxxtools_xml_EndElement_h 00028 00029 #include <cxxtools/xml/api.h> 00030 #include <cxxtools/xml/node.h> 00031 #include <cxxtools/string.h> 00032 00033 00034 namespace cxxtools { 00035 00036 namespace xml { 00037 00055 class CXXTOOLS_XML_API EndElement : public Node 00056 { 00057 public: 00064 explicit EndElement(const String& name = String()) 00065 : Node(Node::EndElement), 00066 _name(name) 00067 { } 00068 00073 EndElement* clone() const 00074 {return new EndElement(*this);} 00075 00076 void clear() 00077 { _name.clear(); } 00078 00088 String& name() 00089 { return _name; } 00090 00100 const String& name() const 00101 { return _name; } 00102 00107 void setName(const String& name) 00108 { _name = name; } 00109 00119 virtual bool operator==(const Node& node) const; 00120 00121 private: 00123 String _name; 00124 }; 00125 00126 } 00127 00128 } 00129 00130 #endif