00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00012 #ifndef ZYPP_CAPFACTORY_H 00013 #define ZYPP_CAPFACTORY_H 00014 00015 #include <iosfwd> 00016 00017 #include "zypp/base/PtrTypes.h" 00018 00019 #include "zypp/Capability.h" 00020 00022 namespace zypp 00023 { 00024 00026 // 00027 // CLASS NAME : CapFactory 00028 // 00037 class CapFactory 00038 { 00039 friend std::ostream & operator<<( std::ostream & str, const CapFactory & obj ); 00040 00041 public: 00043 CapFactory(); 00044 00046 ~CapFactory(); 00047 00048 public: 00053 Capability parse( const Resolvable::Kind & refers_r, 00054 const std::string & strval_r ) const; 00055 00056 00060 Capability parse( const Resolvable::Kind & refers_r, 00061 const std::string & name_r, 00062 const std::string & op_r, 00063 const std::string & edition_r ) const; 00064 00068 Capability parse( const Resolvable::Kind & refers_r, 00069 const std::string & name_r, 00070 Rel op_r, 00071 const Edition & edition_r ) const; 00072 00076 Capability halEvalCap() const; 00077 00081 Capability modaliasEvalCap() const; 00082 00083 public: 00085 std::string encode( const Capability & cap_r ) const; 00086 00087 private: 00089 struct Impl; 00091 RW_pointer<Impl> _pimpl; 00092 }; 00094 00096 extern std::ostream & operator<<( std::ostream & str, const CapFactory & obj ); 00097 00099 } // namespace zypp 00101 #endif // ZYPP_CAPFACTORY_H