libzypp: zypp/solver/detail/ItemCapKind.h Source File

libzypp 17.38.6

ItemCapKind.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12
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!
17#else
18
20namespace zypp
21{
23 namespace solver
24 {
26 namespace detail
27 {
31 struct ItemCapKind
32 {
33 public:
34 ItemCapKind() : _pimpl( new Impl ) {}
35
36 ItemCapKind( PoolItem i, Capability c, Dep k, bool initial ) : _pimpl( new Impl( i, c, k, initial ) ) {}
37
39 Capability cap() const
40 { return _pimpl->_cap; }
41
43 Dep capKind() const
44 { return _pimpl->_capKind; }
45
47 PoolItem item() const
48 { return _pimpl->_item; }
49
51 bool initialInstallation() const
52 { return _pimpl->_initialInstallation; }
53
54 private:
55 struct Impl
56 {
57 Impl()
58 : _capKind( Dep::PROVIDES )
59 , _initialInstallation( false )
60 {}
61
62 Impl( PoolItem i, Capability c, Dep k, bool initial )
63 : _cap( c )
64 , _capKind( k )
65 , _item( i )
66 , _initialInstallation( initial )
67 {}
68
69 Capability _cap;
70 Dep _capKind;
71 PoolItem _item;
72 bool _initialInstallation;
73
74 private:
75 friend Impl * rwcowClone<Impl>( const Impl * rhs );
77 Impl * clone() const
78 { return new Impl( *this ); }
79 };
80 RWCOW_pointer<Impl> _pimpl;
81 };
82
83 typedef std::multimap<PoolItem,ItemCapKind> ItemCapKindMap;
84 typedef std::list<ItemCapKind> ItemCapKindList;
85
86 } // namespace detail
88 } // namespace solver
90} // namespace zypp
92#endif // ZYPP_USE_RESOLVER_INTERNALS
93#endif // ZYPP_SOLVER_DETAIL_ITEMCAPKIND_H
zypp::sat::_pimpl
RWCOW_pointer< Impl > _pimpl
Implementation class.
Definition SolvableSpec.h:122
zypp::solver::detail
Definition PoolImpl.h:110
zypp::solver::detail::ItemCapKindList
std::list< ItemCapKind > ItemCapKindList
Definition Types.h:42
zypp::solver
Definition PoolImpl.h:109
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2