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 #ifndef _DEF_SVX_SVX_H_ 00045 #define _DEF_SVX_SVX_H_ 00046 00047 //#include <list> 00048 00049 //#include "product.h" 00050 00051 #include "mvector.h" 00052 #include "element.h" 00053 00054 namespace libsvx { 00055 00056 class Attribute; 00057 class Product; 00058 class Version; 00059 00064 class Svx : public Element { 00065 00066 public: 00068 Svx(TiXmlElement & Element); 00069 ~Svx(); 00070 00071 bool IsValid() const; 00072 00073 TiXmlElement & XmlElement(); 00074 00075 // multiple data source routines 00076 00077 bool Add(TiXmlElement & Element); 00078 00079 // product searching routines 00080 00081 Product * FindProduct(const std::string & the_product_name) const; 00082 00083 void Iterate_Product_Begin(); 00084 bool Iterate_Product_IsBegin(); 00085 bool Iterate_Product_IsEnd(); 00086 const std::string & Iterate_Product_Next(); 00087 const std::string & Iterate_Product_Prev(); 00088 00089 // Version searching routines 00090 00091 Version * FindVersion(const std::string & the_product_uid, const std::string & the_version_name); 00092 00093 void Iterate_Version_Begin(const std::string & the_product_uid); 00094 bool Iterate_Version_IsBegin(const std::string & the_product_uid); 00095 bool Iterate_Version_IsEnd(const std::string & the_product_uid); 00096 const std::string & Iterate_Version_Next(const std::string & the_product_uid); 00097 const std::string & Iterate_Version_Prev(const std::string & the_product_uid); 00098 00099 protected: 00101 Attribute * m_A_href; 00103 Attribute * m_A_version; 00105 Mvector<Product> m_List_Product; 00106 00108 size_t m_Iterator_Product; 00109 }; 00110 }; 00111 00112 #endif // _DEF_SVX_SVX_H_