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

InstData.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       InstData.h
00014 
00015   Author:     Michael Andres <ma@suse.de>
00016   Maintainer: Michael Andres <ma@suse.de>
00017 
00018   Purpose:    Interface class for InstSrcData and InstTarget and other
00019               classes that may provide Packages/Selections/YouPatches.
00020 
00021 /-*/
00022 #ifndef InstData_h
00023 #define InstData_h
00024 
00025 #include <iosfwd>
00026 #include <list>
00027 
00028 #include <y2util/Pathname.h>
00029 
00030 #include <y2pm/PMPackagePtr.h>
00031 #include <y2pm/PMSelectionPtr.h>
00032 #include <y2pm/PMYouPatchPtr.h>
00033 
00034 #include <y2pm/MediaAccess.h>
00035 
00037 //
00038 //      CLASS NAME : InstData
00039 //
00043 class InstData {
00044 
00045   protected:
00046 
00047     InstData();
00048 
00049     virtual ~InstData();
00050 
00051   public:
00052 
00059     virtual const std::list<PMSelectionPtr>& getSelections (void) const = 0;
00060 
00061     unsigned numSelections() const { return getSelections().size(); }
00062 
00069     virtual const std::list<PMPackagePtr>& getPackages (void) const = 0;
00070 
00071     unsigned numPackages() const { return getPackages().size(); }
00072 
00079     virtual const std::vector<PMYouPatchPtr>& getPatches (void) const = 0;
00080 
00081     unsigned numPatches() const { return getPatches().size(); }
00082 
00087     static const std::list<PMPackagePtr> findPackages (const std::list<PMPackagePtr>& packages, const std::string& name = "", const std::string& arch = "", const std::string& version = "", const std::string& release = "");
00088 
00093     static const std::list<PMSelectionPtr> findSelections (const std::list<PMSelectionPtr>& selections, const std::string& arch = "", const std::string& name = "", const std::string& version = "", const std::string& release = "");
00094 };
00095 
00097 
00098 #endif // InstData_h
00099 

Generated on Fri Nov 9 14:30:31 2007 for yast2-packagemanager by doxygen 1.3.6