Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

IgnoredRelations.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                     (C) 2004 SUSE AG |
00011 \----------------------------------------------------------------------/
00012 
00013    File:       IgnoredRelations.h
00014    Purpose:    Classes for ignoring Relations
00015    Author:     Ludwig Nussel <lnussel@suse.de>
00016    Maintainer: Ludwig Nussel <lnussel@suse.de>
00017 
00018 /-*/
00019 
00020 #ifndef _IgnoredRelations_h
00021 #define _IgnoredRelations_h
00022 
00023 #include <map>
00024 
00025 #include <y2pm/PkgName.h>
00026 #include <y2pm/PkgRelation.h>
00027 
00028 class IgnoredRelations
00029 {
00030     public:
00031         class Ignored
00032         {
00033             public:
00034                 Ignored(PkgName* pkg, PkgRelation r);
00035                 
00036                 Ignored(const Ignored& rhs);
00037 
00038                 Ignored& operator=(const Ignored& rhs);
00039 
00040             public:
00042                 PkgName* pkg;
00043 
00045                 PkgRelation rel;
00046         };
00047         
00048     private:
00049         // name of requirement -> ignore class
00050         typedef std::multimap<PkgName, Ignored> IgnoreList;
00051 
00052         IgnoreList _ignored;
00053 
00054     public:
00055 
00056         IgnoredRelations();
00057 
00058         virtual ~IgnoredRelations();
00059 
00060         void add(const PkgRelation& rel, PkgName* n = NULL);
00061         
00062         void add(const PkgRelation& rel, PMSolvablePtr pkg);
00063         
00064         virtual bool isIgnored(const PkgRelation& rel, PkgName* n = NULL);
00065         
00066         virtual bool isIgnored(const PkgRelation& rel, PMSolvablePtr);
00067 };
00068 
00069 class IgnoredRequirements : public IgnoredRelations
00070 {
00071     public:
00072         IgnoredRequirements();
00073         ~IgnoredRequirements();
00074 
00075         virtual bool isIgnored(const PkgRelation& rel, PkgName* n = NULL);
00076         
00077         virtual bool isIgnored(const PkgRelation& rel, PMSolvablePtr);
00078 };
00079 
00080 #endif

Generated on Mon Sep 12 21:52:12 2005 for yast2-packagemanager by  doxygen 1.4.4