- remove SelectionsParser.cc
authorKlaus Kaempf <kkaempf@suse.de>
Thu, 2 Feb 2006 21:52:42 +0000 (21:52 +0000)
committerKlaus Kaempf <kkaempf@suse.de>
Thu, 2 Feb 2006 21:52:42 +0000 (21:52 +0000)
- rename SelectionSelFileParser -> SelectionTagFileParser
- add Pattern parser

zypp/source/susetags/Makefile.am
zypp/source/susetags/PatternTagFileParser.cc [new file with mode: 0644]
zypp/source/susetags/PatternTagFileParser.h [new file with mode: 0644]
zypp/source/susetags/SelectionTagFileParser.cc [moved from zypp/source/susetags/SelectionSelFileParser.cc with 92% similarity]
zypp/source/susetags/SelectionTagFileParser.h [moved from zypp/source/susetags/SelectionSelFileParser.h with 87% similarity]
zypp/source/susetags/SelectionsParser.cc [deleted file]
zypp/source/susetags/SuseTagsImpl.cc
zypp/source/susetags/SuseTagsPatternImpl.cc [new file with mode: 0644]
zypp/source/susetags/SuseTagsPatternImpl.h [new file with mode: 0644]

index 2902fbc..6fe5fe4 100644 (file)
@@ -11,8 +11,10 @@ sourceinclude_HEADERS =      \
        PackagesParser.h\
        SuseTagsImpl.h \
        SuseTagsSelectionImpl.h \
+       SuseTagsPatternImpl.h \
        SuseTagsPackageImpl.h \
-       SelectionSelFileParser.h \
+       SelectionTagFileParser.h \
+       PatternTagFileParser.h \
        ProductMetadataParser.h \
        MediaMetadataParser.h \
        MediaPatchesMetadataParser.h
@@ -25,8 +27,10 @@ lib@PACKAGE@_source_susetags_la_SOURCES = \
        PackagesParser.cc       \
        SuseTagsImpl.cc \
        SuseTagsSelectionImpl.cc \
+       SuseTagsPatternImpl.cc \
        SuseTagsPackageImpl.cc \
-       SelectionSelFileParser.cc \
+       SelectionTagFileParser.cc \
+       PatternTagFileParser.cc \
        ProductMetadataParser.cc \
        MediaMetadataParser.cc \
        MediaPatchesMetadataParser.cc
diff --git a/zypp/source/susetags/PatternTagFileParser.cc b/zypp/source/susetags/PatternTagFileParser.cc
new file mode 100644 (file)
index 0000000..ada7032
--- /dev/null
@@ -0,0 +1,162 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/parser/tagfile/PatternTagFileParser.cc
+ *
+*/
+#include <iostream>
+#include <fstream>
+#include <sstream>
+
+#include <boost/tokenizer.hpp>
+#include <boost/algorithm/string.hpp>
+
+#include "zypp/base/Logger.h"
+#include "zypp/base/PtrTypes.h"
+#include "zypp/base/String.h"
+#include "zypp/CapFactory.h"
+
+#include "zypp/source/susetags/PatternTagFileParser.h"
+#include <boost/regex.hpp>
+
+#undef ZYPP_BASE_LOGGER_LOGGROUP
+#define ZYPP_BASE_LOGGER_LOGGROUP "PatternsTagFileParser"
+
+using namespace std;
+using namespace boost;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+  namespace source
+  { /////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    namespace susetags
+    { /////////////////////////////////////////////////////////////////
+
+      Pattern::Ptr parsePattern( const Pathname & file_r )
+      {
+        PatternTagFileParser p;
+        p.parse( file_r );
+        return p.result;
+
+      }
+
+      PatternTagFileParser::PatternTagFileParser()
+      {
+        selImpl = shared_ptr<SuseTagsPatternImpl>(new SuseTagsPatternImpl);
+      }
+
+      void PatternTagFileParser::consume( const SingleTag &tag )
+      {
+        if ( tag.name == "Sum" )
+        {
+          selImpl->_summary.setText(tag.value, LanguageCode(tag.modifier));
+        }
+        else if ( tag.name == "Ver" )
+        {
+          selImpl->_parser_version = tag.value;
+        }
+        else if ( tag.name == "Pat" )
+        {
+          std::string line = tag.value;
+          std::vector<std::string> words;
+          str::split( line, std::back_inserter(words), " " );
+          XXX << "[" << words[0] << "]" << "[" << words[1] << "]" << "[" << words[2] << "]" << "[" << words[3] << "]" << std::endl;
+          selImpl->_name = words[0];
+          selImpl->_version = words[1];
+          selImpl->_release = words[2];
+          selImpl->_arch = words[3];
+        }
+        else if ( tag.name == "Vis" )
+        {
+          selImpl->_visible = (tag.value == "true") ? true : false;
+        }
+        else if ( tag.name == "Cat" )
+        {
+          selImpl->_category = tag.value;
+        }
+         else if ( tag.name == "Ord" )
+        {
+          selImpl->_order = tag.value;
+        }
+      }
+      
+      void PatternTagFileParser::consume( const MultiTag &tag )
+      {
+        if ( tag.name == "Req" )
+        {
+          selImpl->_requires = tag.values;
+        }
+        else if ( tag.name == "Rec" )
+        {
+          selImpl->_recommends = tag.values;
+        }
+        else if ( tag.name == "Con" )
+        {
+          selImpl->_conflicts = tag.values;
+        }
+        else if ( tag.name == "Prq" )          // package requires
+        {
+          selImpl->_pkgrequires = tag.values;
+        }
+        else if ( tag.name == "Prc" )          // package recommends
+        {
+          selImpl->_pkgrecommends = tag.values;
+        }
+      }
+
+      void PatternTagFileParser::endParse()
+      {
+        #warning FIXME how to insert the specific language packages
+        CapFactory _f;
+       Dependencies _deps;
+
+        for (std::list<std::string>::const_iterator it = selImpl->_recommends.begin(); it != selImpl->_recommends.end(); it++)
+        {
+          Capability _cap = _f.parse( ResTraits<Pattern>::kind, *it );
+         _deps[Dep::RECOMMENDS].insert(_cap);
+        }
+
+        for (std::list<std::string>::const_iterator it = selImpl->_requires.begin(); it != selImpl->_requires.end(); it++)
+        {
+          Capability _cap = _f.parse( ResTraits<Pattern>::kind, *it );
+         _deps[Dep::REQUIRES].insert(_cap);
+        }
+
+        for (std::list<std::string>::const_iterator it = selImpl->_conflicts.begin(); it != selImpl->_conflicts.end(); it++)
+        {
+          Capability _cap = _f.parse( ResTraits<Pattern>::kind, *it );
+         _deps[Dep::CONFLICTS].insert(_cap);
+        }
+
+        for (std::list<std::string>::const_iterator it = selImpl->_recommends.begin(); it != selImpl->_pkgrecommends.end(); it++)
+        {
+          Capability _cap = _f.parse( ResTraits<Package>::kind, *it );
+         _deps[Dep::RECOMMENDS].insert(_cap);
+        }
+
+        for (std::list<std::string>::const_iterator it = selImpl->_requires.begin(); it != selImpl->_pkgrequires.end(); it++)
+        {
+          Capability _cap = _f.parse( ResTraits<Package>::kind, *it );
+         _deps[Dep::REQUIRES].insert(_cap);
+        }
+
+        NVRAD nvrad = NVRAD( selImpl->_name, Edition(selImpl->_version, selImpl->_release, std::string()), Arch(selImpl->_arch), _deps );
+        result = detail::makeResolvableFromImpl( nvrad, selImpl );
+      }
+       /////////////////////////////////////////////////////////////////
+    } // namespace tagfile
+    ///////////////////////////////////////////////////////////////////
+    /////////////////////////////////////////////////////////////////
+  } // namespace parser
+  ///////////////////////////////////////////////////////////////////
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
diff --git a/zypp/source/susetags/PatternTagFileParser.h b/zypp/source/susetags/PatternTagFileParser.h
new file mode 100644 (file)
index 0000000..d83043d
--- /dev/null
@@ -0,0 +1,67 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/source/susetags/PatternTagFileParser.h
+ *
+*/
+#ifndef ZYPP_PARSER_TAGFILE_PATTERNTAGFILEPARSER_H
+#define ZYPP_PARSER_TAGFILE_PATTERNTAGFILEPARSER_H
+
+#include <iosfwd>
+#include <set>
+#include <map>
+#include <list>
+
+#include "zypp/parser/tagfile/TagFileParser.h"
+#include "zypp/parser/tagfile/ParseException.h"
+#include "zypp/Pattern.h"
+#include "zypp/source/susetags/SuseTagsPatternImpl.h"
+
+#include "zypp/Pathname.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+  namespace source
+  { /////////////////////////////////////////////////////////////////
+    ///////////////////////////////////////////////////////////////////
+    namespace susetags
+    { /////////////////////////////////////////////////////////////////
+
+      ///////////////////////////////////////////////////////////////////
+      //
+      //       CLASS NAME : PatternTagFileParser
+      //
+      /** Tagfile parser. */
+      struct PatternTagFileParser : public zypp::parser::tagfile::TagFileParser
+      {
+        Pattern::Ptr result;
+        shared_ptr<SuseTagsPatternImpl> selImpl;
+        
+        PatternTagFileParser();
+        virtual ~PatternTagFileParser()
+        {}
+
+        void consume( const SingleTag &tag );
+        void consume( const MultiTag &tag );
+        void endParse();
+      };
+      ///////////////////////////////////////////////////////////////////
+      Pattern::Ptr parsePattern( const Pathname & file_r );
+      /////////////////////////////////////////////////////////////////
+    } // namespace source
+    ///////////////////////////////////////////////////////////////////
+    /////////////////////////////////////////////////////////////////
+  } // namespace susetags
+  ///////////////////////////////////////////////////////////////////
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+//
+#endif //  ZYPP_PARSER_TAGFILE_PATTERNTAGFILEPPARSER_H
@@ -6,7 +6,7 @@
 |                         /_____||_| |_| |_|                           |
 |                                                                      |
 \---------------------------------------------------------------------*/
-/** \file      zypp/parser/tagfile/SelectionSelFileParser.cc
+/** \file      zypp/parser/tagfile/SelectionTagFileParser.cc
  *
 */
 #include <iostream>
 #include "zypp/base/String.h"
 #include "zypp/CapFactory.h"
 
-#include "zypp/source/susetags/SelectionSelFileParser.h"
+#include "zypp/source/susetags/SelectionTagFileParser.h"
 #include <boost/regex.hpp>
 
+#undef ZYPP_BASE_LOGGER_LOGGROUP
 #define ZYPP_BASE_LOGGER_LOGGROUP "SelectionsTagFileParser"
 
 using namespace std;
@@ -41,18 +42,18 @@ namespace zypp
 
       Selection::Ptr parseSelection( const Pathname & file_r )
       {
-        SelectionSelFileParser p;
+        SelectionTagFileParser p;
         p.parse( file_r );
         return p.result;
 
       }
 
-      SelectionSelFileParser::SelectionSelFileParser()
+      SelectionTagFileParser::SelectionTagFileParser()
       {
         selImpl = shared_ptr<SuseTagsSelectionImpl>(new SuseTagsSelectionImpl);
       }
 
-      void SelectionSelFileParser::consume( const SingleTag &tag )
+      void SelectionTagFileParser::consume( const SingleTag &tag )
       {
         if ( tag.name == "Sum" )
         {
@@ -87,7 +88,7 @@ namespace zypp
         }
       }
       
-      void SelectionSelFileParser::consume( const MultiTag &tag )
+      void SelectionTagFileParser::consume( const MultiTag &tag )
       {
         if ( tag.name == "Req" )
         {
@@ -107,7 +108,7 @@ namespace zypp
         }
       }
 
-      void SelectionSelFileParser::endParse()
+      void SelectionTagFileParser::endParse()
       {
         #warning FIXME how to insert the specific language packages
         CapFactory _f;
@@ -9,8 +9,8 @@
 /** \file      zypp/parser/tagfile/Parser.h
  *
 */
-#ifndef ZYPP_PARSER_TAGFILE_SelectionSelFilePARSER_H
-#define ZYPP_PARSER_TAGFILE_SelectionSelFilePARSER_H
+#ifndef ZYPP_PARSER_TAGFILE_SELECTIONTAGFILEPARSER_H
+#define ZYPP_PARSER_TAGFILE_SELECTIONTAGFILEPARSER_H
 
 #include <iosfwd>
 #include <set>
@@ -36,16 +36,16 @@ namespace zypp
 
       ///////////////////////////////////////////////////////////////////
       //
-      //       CLASS NAME : SelectionSelFileParser
+      //       CLASS NAME : SelectionTagFileParser
       //
       /** Tagfile parser. */
-      struct SelectionSelFileParser : public zypp::parser::tagfile::TagFileParser
+      struct SelectionTagFileParser : public zypp::parser::tagfile::TagFileParser
       {
         Selection::Ptr result;
         shared_ptr<SuseTagsSelectionImpl> selImpl;
         
-        SelectionSelFileParser();
-        virtual ~SelectionSelFileParser()
+        SelectionTagFileParser();
+        virtual ~SelectionTagFileParser()
         {}
 
         void consume( const SingleTag &tag );
@@ -64,4 +64,4 @@ namespace zypp
 } // namespace zypp
 ///////////////////////////////////////////////////////////////////
 //
-#endif //  ZYPP_PARSER_TAGFILE_SelectionSelFilePPARSER_H
+#endif //  ZYPP_PARSER_TAGFILE_SELECTIONTAGFILEPPARSER_H
diff --git a/zypp/source/susetags/SelectionsParser.cc b/zypp/source/susetags/SelectionsParser.cc
deleted file mode 100644 (file)
index 6fca408..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/*---------------------------------------------------------------------\
-|                          ____ _   __ __ ___                          |
-|                         |__  / \ / / . \ . \                         |
-|                           / / \ V /|  _/  _/                         |
-|                          / /__ | | | | | |                           |
-|                         /_____||_| |_| |_|                           |
-|                                                                      |
-\---------------------------------------------------------------------*/
-/** \file      zypp/source/susetags/SelectionsParser.cc
- *
-*/
-#include <iostream>
-#include "zypp/base/Logger.h"
-
-#include "zypp/source/susetags/SelectionsParser.h"
-#include "zypp/parser/tagfile/Parser.h"
-#include "zypp/Selection.h"
-#include "zypp/detail/SelectionImpl.h"
-#include "zypp/CapFactory.h"
-#include "zypp/CapSet.h"
-
-
-using std::endl;
-
-///////////////////////////////////////////////////////////////////
-namespace zypp
-{ /////////////////////////////////////////////////////////////////
-  ///////////////////////////////////////////////////////////////////
-  namespace source
-  { /////////////////////////////////////////////////////////////////
-    ///////////////////////////////////////////////////////////////////
-    namespace susetags
-    { /////////////////////////////////////////////////////////////////
-
-      using namespace parser::tagfile;
-
-      struct SelectionsParser : public parser::tagfile::Parser
-      {
-        std::list<Selection::Ptr> result;
-
-        shared_ptr<detail::SelectionImpl> pkgImpl;
-        NVRAD nvrad;
-
-        bool pkgPending() const
-        { return pkgImpl; }
-
-        void collectPkg( const shared_ptr<detail::SelectionImpl> & nextPkg_r
-                         = shared_ptr<detail::SelectionImpl>() )
-        {
-          if ( pkgPending() )
-            {
-              result.push_back( detail::makeResolvableFromImpl( nvrad, pkgImpl ) );
-            }
-          pkgImpl = nextPkg_r;
-        }
-
-        void newPkg()
-        {
-          collectPkg( shared_ptr<detail::SelectionImpl>(new detail::SelectionImpl) );
-        }
-
-        void collectDeps( const std::list<std::string> & depstr_r, CapSet & capset )
-        {
-          for ( std::list<std::string>::const_iterator it = depstr_r.begin();
-                it != depstr_r.end(); ++it )
-            {
-              capset.insert( CapFactory().parse( ResTraits<Selection>::kind, *it ) );
-            }
-        }
-
-        /* Consume SingleTag data. */
-        virtual void consume( const STag & stag_r )
-        {
-          if ( stag_r.stag.isPlain( "Pkg" ) )
-            {
-              std::vector<std::string> words;
-              str::split( stag_r.value, std::back_inserter(words) );
-
-              if ( str::split( stag_r.value, std::back_inserter(words) ) != 4 )
-                ZYPP_THROW( ParseException( "Pkg" ) );
-
-              newPkg();
-              nvrad = NVRAD( words[0], Edition(words[1],words[2]), Arch(words[3]) );
-            }
-        }
-
-        /* Consume MulitTag data. */
-        virtual void consume( const MTag & mtag_r )
-        {
-          if ( ! pkgPending() )
-            return;
-
-          if ( mtag_r.stag.isPlain( "Prv" ) )
-            {
-              collectDeps( mtag_r.value, nvrad[Dep::PROVIDES] );
-            }
-          else if ( mtag_r.stag.isPlain( "Prq" ) )
-            {
-              collectDeps( mtag_r.value, nvrad[Dep::PREREQUIRES] );
-            }
-          else if ( mtag_r.stag.isPlain( "Req" ) )
-            {
-              collectDeps( mtag_r.value, nvrad[Dep::REQUIRES] );
-            }
-          else if ( mtag_r.stag.isPlain( "Con" ) )
-            {
-              collectDeps( mtag_r.value, nvrad[Dep::CONFLICTS] );
-            }
-          else if ( mtag_r.stag.isPlain( "Obs" ) )
-            {
-              collectDeps( mtag_r.value, nvrad[Dep::OBSOLETES] );
-            }
-        }
-
-        virtual void parseEnd()
-        { collectPkg(); }
-      };
-
-      ////////////////////////////////////////////////////////////////////////////
-
-      std::list<Selection::Ptr> parseSelections( const Pathname & file_r )
-      {
-        SelectionsParser p;
-        p.parse( file_r );
-        return p.result;
-      }
-
-      /////////////////////////////////////////////////////////////////
-    } // namespace susetags
-    ///////////////////////////////////////////////////////////////////
-    /////////////////////////////////////////////////////////////////
-  } // namespace source
-  ///////////////////////////////////////////////////////////////////
-  /////////////////////////////////////////////////////////////////
-} // namespace zypp
-///////////////////////////////////////////////////////////////////
index 2ba6c79..4b2167a 100644 (file)
@@ -18,7 +18,8 @@
 
 #include "zypp/source/susetags/SuseTagsImpl.h"
 #include "zypp/source/susetags/PackagesParser.h"
-#include "zypp/source/susetags/SelectionSelFileParser.h"
+#include "zypp/source/susetags/SelectionTagFileParser.h"
+#include "zypp/source/susetags/PatternTagFileParser.h"
 
 #include "zypp/SourceFactory.h"
 
@@ -84,7 +85,7 @@ namespace zypp
 
        std::ifstream sels (p.asString().c_str());
 
-       while (!sels.eof())
+       while (sels && !sels.eof())
        {
             std::string selfile;
 
@@ -95,7 +96,7 @@ namespace zypp
            DBG << "Going to parse selection " << selfile << endl;
 
            Pathname file = provideFile(_path + "suse/setup/descr/" + selfile);
-           DBG << "Selection file to parse " << file << endl;
+           MIL << "Selection file to parse " << file << endl;
 
            Selection::Ptr sel( parseSelection( file ) );
 
@@ -106,6 +107,34 @@ namespace zypp
 
            DBG << "Parsing of " << file << " done" << endl;
        }
+
+       // parse patterns
+       p = provideFile(_path + "suse/setup/descr/patterns");
+
+       std::ifstream pats (p.asString().c_str());
+
+       while (pats && !pats.eof())
+       {
+            std::string patfile;
+
+           getline(pats,patfile);
+
+           if (patfile.empty() ) continue;
+
+           DBG << "Going to parse pattern " << patfile << endl;
+
+           Pathname file = provideFile(_path + "suse/setup/descr/" + patfile);
+           MIL << "Pattern file to parse " << file << endl;
+
+           Pattern::Ptr pat( parsePattern( file ) );
+
+           DBG << "Pattern:" << pat << endl;
+
+           if (pat)
+               _store.insert( pat );
+
+           DBG << "Parsing of " << file << " done" << endl;
+       }
       }
       ///////////////////////////////////////////////////////////////////
       //
diff --git a/zypp/source/susetags/SuseTagsPatternImpl.cc b/zypp/source/susetags/SuseTagsPatternImpl.cc
new file mode 100644 (file)
index 0000000..c55ec6c
--- /dev/null
@@ -0,0 +1,62 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/detail/PatternImpl.cc
+ *
+*/
+#include "zypp/source/susetags/SuseTagsPatternImpl.h"
+
+using namespace std;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+  namespace source
+  { /////////////////////////////////////////////////////////////////
+  namespace susetags
+  {
+    ///////////////////////////////////////////////////////////////////
+    //
+    // METHOD NAME : PatternImpl::PatternImpl
+    // METHOD TYPE : Ctor
+    //
+    SuseTagsPatternImpl::SuseTagsPatternImpl()
+    {}
+
+    ///////////////////////////////////////////////////////////////////
+    //
+    // METHOD NAME : PatternImpl::~PatternImpl
+    // METHOD TYPE : Dtor
+    //
+    SuseTagsPatternImpl::~SuseTagsPatternImpl()
+    {}
+
+
+    TranslatedText SuseTagsPatternImpl::summary() const
+    { return _summary; }
+
+    TranslatedText SuseTagsPatternImpl::description() const
+    { return _summary; }
+
+    Label SuseTagsPatternImpl::category() const
+    { return _category; }
+
+    bool SuseTagsPatternImpl::visible() const
+    { return _visible; }
+
+    Label SuseTagsPatternImpl::order() const
+    { return _order; }
+
+    /////////////////////////////////////////////////////////////////
+  } // namespace detail
+  ///////////////////////////////////////////////////////////////////
+  }
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
diff --git a/zypp/source/susetags/SuseTagsPatternImpl.h b/zypp/source/susetags/SuseTagsPatternImpl.h
new file mode 100644 (file)
index 0000000..137b1b2
--- /dev/null
@@ -0,0 +1,97 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file      zypp/detail/PatternImpl.h
+ *
+*/
+#ifndef ZYPP_DETAIL_SUSETAGS_PATTERNIMPL_H
+#define ZYPP_DETAIL_SUSETAGS_PATTERNIMPL_H
+
+#include "zypp/detail/PatternImplIf.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+  namespace source
+  { /////////////////////////////////////////////////////////////////
+  namespace susetags
+  {
+
+    ///////////////////////////////////////////////////////////////////
+    //
+    // CLASS NAME : PatternImpl
+    //
+    /**
+    */
+    struct SuseTagsPatternImpl : public zypp::detail::PatternImplIf
+    {
+    public:
+      SuseTagsPatternImpl();
+      virtual ~SuseTagsPatternImpl();
+
+      /*
+      virtual std::list<std::string> suggests() const;
+      virtual std::list<std::string> recommends() const;
+      virtual std::list<std::string> insnotify( const LangCode & lang = LangCode("") ) const;
+      virtual std::list<std::string> delnotify( const LangCode & lang = LangCode("") ) const;
+      virtual ByteCount size() const;
+      virtual bool providesSources() const;
+      virtual std::string instSrcLabel() const;
+      virtual Vendor instSrcVendor() const;
+      virtual unsigned instSrcRank() const;
+      virtual std::list<PMPatternPtr> suggests_ptrs() const;
+      virtual std::list<PMPatternPtr> recommends_ptrs() const;
+      virtual std::list<std::string> inspacks( const LangCode & lang = LangCode("") ) const;
+      virtual std::list<std::string> delpacks( const LangCode & lang = LangCode("") ) const;
+      virtual PM::LocaleSet supportedLocales() const;
+      virtual std::set<PMSelectablePtr> pureInspacks_ptrs( const LangCode & lang ) const;
+      virtual std::set<PMSelectablePtr> inspacks_ptrs( const LangCode & lang ) const;
+      virtual std::set<PMSelectablePtr> delpacks_ptrs( const LangCode & lang ) const;
+      virtual bool isBase() const;
+      virtual PMError provideSelToInstall( Pathname & path_r ) const;
+      */
+
+      virtual TranslatedText summary() const;
+      virtual TranslatedText description() const;
+      virtual Label category() const;
+      virtual bool visible() const;
+      virtual Label order() const;
+
+      TranslatedText _summary;
+      std::string _parser_version;
+      std::string _name;
+      std::string _version;
+      std::string _release;
+      std::string _arch;
+      std::string _order;
+      std::string _category;
+      bool _visible;
+
+      std::list<std::string> _suggests;
+      std::list<std::string> _recommends;
+      std::list<std::string> _requires;
+      std::list<std::string> _conflicts;
+      std::list<std::string> _pkgsuggests;
+      std::list<std::string> _pkgrecommends;
+      std::list<std::string> _pkgrequires;
+      std::list<std::string> _supported_locales;
+      std::map< LanguageCode, std::list<std::string> > _insnotify;
+      std::map< LanguageCode, std::list<std::string> > _delnotify;
+      
+    };
+    ///////////////////////////////////////////////////////////////////
+
+    /////////////////////////////////////////////////////////////////
+  } // namespace susetags
+  ///////////////////////////////////////////////////////////////////
+  } // namespace source
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_DETAIL_PATTERNIMPL_H