CapFactory.h

Go to the documentation of this file.
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 #include "zypp/capability/CapabilityImpl.h"
00021 
00023 namespace zypp
00024 { 
00025 
00027   //
00028   //    CLASS NAME : CapFactory
00029   //
00038   class CapFactory
00039   {
00040     friend std::ostream & operator<<( std::ostream & str, const CapFactory & obj );
00041 
00042   public:
00044     CapFactory();
00045 
00047     ~CapFactory();
00048 
00049   public:
00050 
00055     Capability fromImpl( capability::CapabilityImpl::Ptr impl ) const;
00056 
00061     Capability parse( const Resolvable::Kind & refers_r,
00062                       const std::string & strval_r ) const;
00064     template<class _Res>
00065     Capability parse( const std::string & strval_r ) const
00066     { return parse( ResTraits<_Res>::kind, strval_r ); }
00067 
00071     Capability parse( const Resolvable::Kind & refers_r,
00072                       const std::string & name_r,
00073                       const std::string & op_r,
00074                       const std::string & edition_r ) const;
00075 
00079     Capability parse( const Resolvable::Kind & refers_r,
00080                       const std::string & name_r,
00081                       Rel op_r,
00082                       const Edition & edition_r ) const;
00083 
00084     public:
00088     Capability halEvalCap() const;
00089 
00093     Capability modaliasEvalCap() const;
00094 
00098     Capability filesystemEvalCap() const;
00099 
00100     public:
00102     std::string encode( const Capability & cap_r ) const;
00103 
00104   private:
00106     struct Impl;
00108     RW_pointer<Impl> _pimpl;
00109   };
00111 
00113   extern std::ostream & operator<<( std::ostream & str, const CapFactory & obj );
00114 
00116 } // namespace zypp
00118 #endif // ZYPP_CAPFACTORY_H

Generated on Tue Sep 25 19:23:00 2007 for libzypp by  doxygen 1.5.3