00001 /****************************************************************************** 00002 00003 Copyright Notice. 00004 00005 Licensed material - Property of Steve Lhomme 00006 00007 This source file is part of Steve Lhomme's libSVX. 00008 (C) Copyright Steve Lhomme, France, 2001-2002. 00009 All rights reserved. Modifications (C) copyrighted by their respective 00010 contributors, all rights reserved. 00011 00012 The contents of this file are subject to the Bixoft Public License 00013 Version 1.0 (the "License"); you may not use this file in any way except 00014 in compliance with the License. You should have received a copy of the 00015 License with this source; see <file or member name>. You may also obtain 00016 a copy of the License at http://www.bixoft.nl/english/license.htm 00017 or http://mukoli.free.fr/BXAPL/ 00018 00019 ANY USE OF THE SOFTWARE CONSTITUTES ACCEPTANCE OF THE LICENSE. 00020 00021 Anything distributed under the License is distributed on an "AS IS" basis, 00022 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 00023 the specific language governing rights and limitations under the License. 00024 00025 Definitions required by the License: 00026 Copyright Holder: Steve Lhomme, France 00027 e-mail: steve.lhomme@free.fr 00028 Country: France, i.e. the laws of France apply. 00029 Court : ???? 00030 Programming Tool status: This source is not a Programming Tool. 00031 00032 Contributor(s): Contribution: 00033 00034 ******************************************************************************/ 00035 00044 #include "../tinyxml/tinyxml.h" 00045 00046 #include "element.h" 00047 00048 using namespace libsvx; 00049 00050 Element::Element(TiXmlElement & Element, const std::string the_name): 00051 m_TagName(the_name) 00052 { 00053 m_Node = new TiXmlElement(Element.Value()); 00054 } 00055 00056 Element::Element(const Element & a_element) 00057 { 00058 m_Node = new TiXmlElement(a_element.m_Node->Value()); // may not be correct 00059 m_TagName = a_element.m_TagName; 00060 } 00061 00062 Element::~Element() 00063 { 00064 delete m_Node; 00065 } 00066 00070 Element & Element::operator+=(const Element & the_object_to_add) 00071 { 00072 assert(m_TagName.compare(the_object_to_add.m_TagName) == 0); 00073 00074 return *this; 00075 } 00076 00080 bool Element::operator!=(const Element & the_object_to_compare) const 00081 { 00082 // bool result = !(IsValid() && the_object_to_compare.IsValid()); 00083 bool result = false; 00084 00085 result = result || (m_TagName != the_object_to_compare.m_TagName); 00086 00087 return result; 00088 }