1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/solver/detail/ItemCapKind.h
13 #ifndef ZYPP_SOLVER_DETAIL_ITEMCAPKIND_H
14 #define ZYPP_SOLVER_DETAIL_ITEMCAPKIND_H
15 #ifndef ZYPP_USE_RESOLVER_INTERNALS
16 #error Do not directly include this file!
19 ///////////////////////////////////////////////////////////////////
22 ///////////////////////////////////////////////////////////////////
25 ///////////////////////////////////////////////////////////////////
28 ///////////////////////////////////////////////////////////////////
29 /// \class ItemCapKind
30 ///////////////////////////////////////////////////////////////////
34 ItemCapKind() : _pimpl( new Impl ) {}
36 ItemCapKind( PoolItem i, Capability c, Dep k, bool initial ) : _pimpl( new Impl( i, c, k, initial ) ) {}
38 /** Capability which has triggerd this selection */
39 Capability cap() const
40 { return _pimpl->_cap; }
42 /** Kind of that capability */
44 { return _pimpl->_capKind; }
46 /** Item which has triggered this selection */
48 { return _pimpl->_item; }
50 /** This item has triggered the installation (Not already fullfilled requierement only). */
51 bool initialInstallation() const
52 { return _pimpl->_initialInstallation; }
58 : _capKind( Dep::PROVIDES )
59 , _initialInstallation( false )
62 Impl( PoolItem i, Capability c, Dep k, bool initial )
66 , _initialInstallation( initial )
72 bool _initialInstallation;
75 friend Impl * rwcowClone<Impl>( const Impl * rhs );
76 /** clone for RWCOW_pointer */
78 { return new Impl( *this ); }
80 RWCOW_pointer<Impl> _pimpl;
83 typedef std::multimap<PoolItem,ItemCapKind> ItemCapKindMap;
84 typedef std::list<ItemCapKind> ItemCapKindList;
87 ///////////////////////////////////////////////////////////////////
89 ///////////////////////////////////////////////////////////////////
91 ///////////////////////////////////////////////////////////////////
92 #endif // ZYPP_USE_RESOLVER_INTERNALS
93 #endif // ZYPP_SOLVER_DETAIL_ITEMCAPKIND_H