1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/CapFactory.h
12 #ifndef ZYPP_CAPFACTORY_H
13 #define ZYPP_CAPFACTORY_H
17 #include "zypp/base/PtrTypes.h"
19 #include "zypp/Capability.h"
21 ///////////////////////////////////////////////////////////////////
23 { /////////////////////////////////////////////////////////////////
24 ///////////////////////////////////////////////////////////////////
26 { /////////////////////////////////////////////////////////////////
27 DEFINE_PTR_TYPE(CapFactoryImpl)
28 /////////////////////////////////////////////////////////////////
30 ///////////////////////////////////////////////////////////////////
32 ///////////////////////////////////////////////////////////////////
34 // CLASS NAME : CapFactory
37 * \todo define EXCEPTIONS
46 CapFactory( detail::CapFactoryImplPtr impl_r );
51 /** Parse Capability from string (incl. ResKind).
52 * \c strval_r is expected to define a valid Capability \em including
54 * \throw EXCEPTION on parse error.
56 Capability parse( const std::string & strval_r ) const;
57 /** Parse Capability from string (default ResKind).
58 * \c strval_r is expected to define a valid Capability. If it does
59 * not define the ResKind, \c defaultRefers_r is used instead.
60 * \throw EXCEPTION on parse error.
62 Capability parse( const std::string & strval_r, const ResKind & defaultRefers_r ) const;
65 /** Pointer to implementation */
66 detail::CapFactoryImplPtr _pimpl;
68 /** Avoid a bunch of friend decl. */
69 detail::constCapFactoryImplPtr sayFriend() const;
71 ///////////////////////////////////////////////////////////////////
73 /** \relates CapFactory Stream output */
74 extern std::ostream & operator<<( std::ostream & str, const CapFactory & obj );
76 /////////////////////////////////////////////////////////////////
78 ///////////////////////////////////////////////////////////////////
79 #endif // ZYPP_CAPFACTORY_H