ProductMetadataParser.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_SOURCE_SUSETAGS_PRODUCTMETADATAPARSER_H
00013 #define ZYPP_SOURCE_SUSETAGS_PRODUCTMETADATAPARSER_H
00014 
00015 #include <iosfwd>
00016 #include <set>
00017 #include <map>
00018 #include <list>
00019 
00020 #include "zypp/parser/tagfile/ParseException.h"
00021 
00022 #include "zypp/CheckSum.h"
00023 #include "zypp/Pathname.h"
00024 #include "zypp/Product.h"
00025 #include "zypp/source/susetags/SuseTagsProductImpl.h"
00027 namespace zypp
00028 { 
00029 
00030   namespace source
00031   { 
00032 
00033     namespace susetags
00034     { 
00035 
00037       //
00038       //        CLASS NAME : ProductMetadataParser
00039       //
00041       struct ProductMetadataParser
00042       {
00043         Product::Ptr result;
00044         detail::ResImplTraits<SuseTagsProductImpl>::Ptr prodImpl;
00045         ProductMetadataParser();
00046         virtual ~ProductMetadataParser()
00047         {}
00048 
00049         /* Parse file and invoke consume on each tag found.
00050          * \throw ParseException
00051          * \todo more doc on Ecaptions.
00052         */
00053         void parse( const Pathname & file_r, Source_Ref source_r);
00054         /* Parse a key.modifier (std::list of std::strings)
00055          * That means, translatable tag with multiple values
00056          * the default modifier will get the modifier of default (LABEL.de, LABEL as LANGUAGE.default)
00057         */
00058         void parseLine( const std::string &key, const std::string &modif, const std::string &value, std::map< std::string, std::list<std::string> > &container);
00059 
00060         void parseLine( const std::string &key, const std::string &lang, const std::string &value, TranslatedText &container);
00061         /*
00062          * same as above, but the value is a single std::string, this means, translatable tags, with only 1 value
00063         */
00064         void parseLine( const std::string &key,const std::string &modif, const std::string &value, std::map< std::string, std::string > &container);
00065         /*
00066          * Non translatable tag with multiple values
00067          */
00068         void parseLine( const std::string &key, const std::string &value, std::list<std::string> &container);
00069         /*
00070          * Dependency (REQUIRES, PROVIDES, CONFLICTS, ...) capabilites  line
00071          */
00072         void parseDependencies( const std::string &key, const std::string &value, zypp::Dependencies & deps, zypp::Dep deptag );
00073         /*
00074          */
00075         void parseFileCheckSum( const std::string &key, const std::string &value, std::map<std::string, CheckSum> &container);
00076 
00077 
00078         bool volatile_content;
00079 
00080       };
00082 
00084     } // namespace tagfile
00087   } // namespace parser
00090 } // namespace zypp
00092 //
00093 #endif //  ZYPP_SOURCE_SUSETAGS_PRODUCTMETADATAPARSER_H

Generated on Thu Jul 6 00:07:24 2006 for zypp by  doxygen 1.4.6