YUMPrimaryParser.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00015 #ifndef YUMPrimaryParser_h
00016 #define YUMPrimaryParser_h
00017 
00018 #include <zypp/parser/yum/YUMParserData.h>
00019 #include <zypp/parser/XMLNodeIterator.h>
00020 #include <zypp/parser/LibXMLHelper.h>
00021 #include <zypp/Arch.h>
00022 #include <list>
00023 
00024 namespace zypp
00025 {
00026 namespace parser
00027 {
00028 namespace yum
00029 {
00030 
00051 class YUMPrimaryParser : public XMLNodeIterator<YUMPrimaryData_Ptr>
00052 {
00053 public:
00054   YUMPrimaryParser(std::istream &is, const std::string &baseUrl, parser::ParserProgress::Ptr progress = parser::ParserProgress::Ptr() );
00055   YUMPrimaryParser(const Pathname &filename, const std::string &baseUrl, parser::ParserProgress::Ptr progress = parser::ParserProgress::Ptr() );
00056   YUMPrimaryParser();
00057   YUMPrimaryParser(YUMPrimaryData_Ptr& entry);
00058   virtual ~YUMPrimaryParser();
00059 
00060 private:
00061   // FIXME move needed method to a common class, inherit it
00062   friend class YUMPatchParser;
00063   friend class YUMProductParser;
00064   friend class YUMPatternParser;
00065   virtual bool isInterested(const xmlNodePtr nodePtr);
00066   virtual YUMPrimaryData_Ptr process(const xmlTextReaderPtr reader);
00067   void parseFormatNode(YUMPrimaryData_Ptr dataPtr,
00068                        xmlNodePtr formatNode);
00069   void parseDependencyEntries(std::list<YUMDependency> *depList,
00070                               xmlNodePtr depNode);
00071   void parseAuthorEntries(std::list<std::string> *authors,
00072                           xmlNodePtr node);
00073   void parseKeywordEntries(std::list<std::string> *keywords,
00074                            xmlNodePtr node);
00075   void parseDirsizeEntries(std::list<YUMDirSize> *sizes,
00076                            xmlNodePtr node);
00077 
00078   LibXMLHelper _helper;
00079   Arch _zypp_architecture;
00080 };
00081 } // namespace yum
00082 } // namespace parser
00083 } // namespace zypp
00084 
00085 #endif

Generated on Tue Nov 28 16:49:30 2006 for zypp by  doxygen 1.5.0