libzypp 8.13.6
|
00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00012 #ifndef ZYPP_VENDORATTR_H 00013 #define ZYPP_VENDORATTR_H 00014 00015 #include <iosfwd> 00016 #include <string> 00017 #include <vector> 00018 00019 #include "zypp/PathInfo.h" 00020 #include "zypp/Vendor.h" 00021 00023 namespace zypp { 00025 00026 class PoolItem; 00027 namespace sat 00028 { 00029 class Solvable; 00030 } 00031 00041 class VendorAttr 00042 { 00043 public: 00044 typedef std::vector<std::string> VendorList; 00045 00047 static const VendorAttr & instance(); 00048 00052 bool addVendorDirectory( const Pathname & dirname ) const; 00053 00057 bool addVendorFile( const Pathname & filename ) const; 00058 00062 template <class _Iterator> 00063 void addVendorList( _Iterator begin, _Iterator end ) const 00064 { VendorList tmp( begin, end ); _addVendorList( tmp ); } 00065 00071 bool equivalent( const Vendor & lVendor, const Vendor & rVendor ) const; 00073 bool equivalent( IdString lVendor, IdString rVendor ) const; 00075 bool equivalent( sat::Solvable lVendor, sat::Solvable rVendor ) const; 00077 bool equivalent( const PoolItem & lVendor, const PoolItem & rVendor ) const; 00078 00079 private: 00080 VendorAttr(); 00081 void _addVendorList( VendorList & ) const; 00082 }; 00083 00085 std::ostream & operator<<( std::ostream & str, const VendorAttr & obj ); 00086 00088 }; // namespace zypp 00090 00091 #endif // ZYPP_VENDORATTR_H