libzypp
11.13.5
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
libzypp
Welcome to libzypp
Code Pitfalls - Frequently made mistakes
Code Snippets
Environment Variables
Testing for provided features.
Notes on revisions
Extending ZYpp: Plugins and Hooks
Services
Solver - Vendor protection
Writing and tunning testcases
Libzypp and threads
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
zypp
base
media
misc
parser
pool
repo
sat
solver
target
thread
ui
url
ws
zypp_detail
APIConfig.h
Arch.cc
Arch.h
AutoDispose.h
Bit.h
ByteCount.cc
ByteCount.h
Callback.h
Capabilities.cc
Capabilities.h
Capability.cc
Capability.h
CapMatch.cc
CapMatch.h
Changelog.cc
Changelog.h
CheckSum.cc
CheckSum.h
CountryCode.cc
CountryCode.h
Date.cc
Date.h
Dep.cc
Dep.h
Digest.cc
Digest.h
DiskUsage.cc
DiskUsage.h
DiskUsageCounter.cc
DiskUsageCounter.h
DownloadMode.cc
DownloadMode.h
Edition.cc
Edition.h
ExternalProgram.cc
ExternalProgram.h
Fetcher.cc
Fetcher.h
FileChecker.cc
FileChecker.h
Filter.h
Glob.cc
Glob.h
HistoryLog.cc
HistoryLog.h
HistoryLogData.cc
HistoryLogData.h
IdString.cc
IdString.h
IdStringType.h
InstanceId.cc
InstanceId.h
KeyContext.h
KeyRing.cc
KeyRing.h
KVMap.h
LanguageCode.cc
LanguageCode.h
Locale.cc
Locale.h
Locks.cc
Locks.h
ManagedFile.h
MediaProducts.cc
MediaProducts.h
MediaSetAccess.cc
MediaSetAccess.h
Misc.h
OnMediaLocation.cc
OnMediaLocation.h
Package.cc
Package.h
PackageKeyword.h
Patch.cc
Patch.h
PathInfo.cc
PathInfo.h
Pathname.cc
Pathname.h
Pattern.cc
Pattern.h
PluginFrame.cc
PluginFrame.h
PluginFrameException.cc
PluginFrameException.h
PluginScript.cc
PluginScript.h
PluginScriptException.cc
PluginScriptException.h
PoolItem.cc
PoolItem.h
PoolItemBest.cc
PoolItemBest.h
PoolQuery.cc
PoolQuery.h
PoolQueryResult.cc
PoolQueryResult.h
PoolQueryUtil.tcc
ProblemSolution.cc
ProblemSolution.h
ProblemTypes.h
Product.cc
Product.h
ProgressData.cc
ProgressData.h
ProvideFilePolicy.cc
ProvideFilePolicy.h
PublicKey.cc
PublicKey.h
Range.cc
Range.h
Rel.cc
Rel.h
RelCompare.h
RepoInfo.cc
RepoInfo.h
RepoManager.cc
RepoManager.h
Repository.cc
Repository.h
RepoStatus.cc
RepoStatus.h
ResFilters.h
ResKind.cc
ResKind.h
ResObject.cc
ResObject.h
ResObjects.h
Resolvable.cc
Resolvable.h
Resolver.cc
Resolver.h
ResolverProblem.cc
ResolverProblem.h
ResPool.cc
ResPool.h
ResPoolProxy.cc
ResPoolProxy.h
ResStatus.cc
ResStatus.h
ResTraits.h
ServiceInfo.cc
ServiceInfo.h
Signature.cc
Signature.h
SrcPackage.cc
SrcPackage.h
SysContent.cc
SysContent.h
Target.cc
Target.h
TmpPath.cc
TmpPath.h
TriBool.h
Url.cc
Url.h
Vendor.h
VendorAttr.cc
VendorAttr.h
VendorSupportOptions.cc
VendorSupportOptions.h
ZConfig.cc
ZConfig.h
ZYpp.cc
ZYpp.h
ZYppCallbacks.h
ZYppCommit.h
ZYppCommitPolicy.cc
ZYppCommitPolicy.h
ZYppCommitResult.cc
ZYppCommitResult.h
ZYppFactory.cc
ZYppFactory.h
File Members
PoolItem.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_POOLITEM_H
13
#define ZYPP_POOLITEM_H
14
15
#include <iosfwd>
16
#include <functional>
17
18
#include "
zypp/base/PtrTypes.h
"
19
#include "
zypp/ResObject.h
"
20
#include "
zypp/ResStatus.h
"
21
23
namespace
zypp
24
{
25
26
class
ResPool;
27
28
namespace
pool
29
{
30
class
PoolImpl;
31
}
32
34
//
35
// CLASS NAME : PoolItem
36
//
50
class
PoolItem
51
{
52
friend
std::ostream &
operator<<
( std::ostream & str,
const
PoolItem
& obj );
53
54
public
:
56
class
Impl
;
57
58
public
:
60
PoolItem
();
61
63
explicit
PoolItem
(
const
sat::Solvable
& solvable_r );
64
66
explicit
PoolItem
(
const
ResObject::constPtr
& resolvable_r );
67
69
~PoolItem
();
70
71
public
:
75
ResStatus
&
status
()
const
;
76
78
ResStatus
&
statusReset
()
const
;
79
80
86
bool
isUndetermined
()
const
;
87
91
bool
isRelevant
()
const
;
92
94
bool
isSatisfied
()
const
;
95
97
bool
isBroken
()
const
;
98
102
bool
isNeeded
()
const
;
103
105
bool
isUnwanted
()
const
;
107
109
public
:
111
ResPool
pool
()
const
;
112
114
sat::Solvable
satSolvable
()
const
115
{
return
resolvable
() ?
resolvable
()->satSolvable() :
sat::Solvable::noSolvable
; }
116
120
sat::Solvable
buddy
()
const
;
121
122
public
:
126
ResObject::constPtr
resolvable
()
const
;
127
131
operator
ResObject::constPtr
()
const
132
{
return
resolvable
(); }
133
135
ResObject::constPtr
operator->
()
const
136
{
return
resolvable
(); }
137
140
operator
ResObject::constPtr::unspecified_bool_type()
const
141
{
return
resolvable
(); }
142
143
private
:
144
friend
class
Impl
;
145
friend
class
pool::PoolImpl
;
147
static
PoolItem
makePoolItem
(
const
sat::Solvable
& solvable_r );
149
void
setBuddy
(
sat::Solvable
solv_r );
151
explicit
PoolItem
(
Impl
* implptr_r );
153
RW_pointer<Impl>
_pimpl
;
154
155
private
:
159
friend
class
PoolItemSaver
;
160
void
saveState
()
const
;
161
void
restoreState
()
const
;
162
bool
sameState
()
const
;
164
};
166
168
std::ostream &
operator<<
( std::ostream & str,
const
PoolItem
& obj );
169
171
inline
bool
operator==
(
const
PoolItem
& lhs,
const
PoolItem
& rhs )
172
{
return
lhs.
resolvable
() == rhs.
resolvable
(); }
173
175
inline
bool
operator==
(
const
PoolItem
& lhs,
const
ResObject::constPtr
& rhs )
176
{
return
lhs.
resolvable
() == rhs; }
177
179
inline
bool
operator==
(
const
ResObject::constPtr
& lhs,
const
PoolItem
& rhs )
180
{
return
lhs == rhs.
resolvable
(); }
181
182
184
inline
bool
operator!=
(
const
PoolItem
& lhs,
const
PoolItem
& rhs )
185
{
return
! (lhs==rhs); }
186
188
inline
bool
operator!=
(
const
PoolItem
& lhs,
const
ResObject::constPtr
& rhs )
189
{
return
! (lhs==rhs); }
190
192
inline
bool
operator!=
(
const
ResObject::constPtr
& lhs,
const
PoolItem
& rhs )
193
{
return
! (lhs==rhs); }
194
195
197
inline
bool
identical(
const
PoolItem
& lhs,
const
PoolItem
& rhs )
198
{
return
lhs == rhs || lhs.
satSolvable
().
identical
( rhs.
satSolvable
() ); }
199
201
inline
bool
identical(
const
PoolItem
& lhs,
sat::Solvable
rhs )
202
{
return
lhs.
satSolvable
().
identical
( rhs ); }
203
205
inline
bool
identical(
sat::Solvable
lhs,
const
PoolItem
& rhs )
206
{
return
lhs.
identical
( rhs.
satSolvable
() ); }
207
208
210
inline
bool
sameNVRA(
const
PoolItem
& lhs,
const
PoolItem
& rhs )
211
{
return
lhs == rhs || lhs.
satSolvable
().
sameNVRA
( rhs.
satSolvable
() ); }
212
214
inline
bool
sameNVRA(
const
PoolItem
& lhs,
sat::Solvable
rhs )
215
{
return
lhs.
satSolvable
().
sameNVRA
( rhs ); }
216
218
inline
bool
sameNVRA(
sat::Solvable
lhs,
const
PoolItem
& rhs )
219
{
return
lhs.
sameNVRA
( rhs.
satSolvable
() ); }
220
225
struct
asPoolItem
226
{
227
typedef
PoolItem
result_type
;
228
229
PoolItem
operator()
(
const
sat::Solvable
& solv_r )
const
230
{
return
PoolItem
( solv_r ); }
231
};
232
234
}
// namespace zypp
237
namespace
std
238
{
239
241
template
<>
242
inline
bool
less<zypp::PoolItem>::operator()(
const
zypp::PoolItem
& lhs,
const
zypp::PoolItem
& rhs )
const
243
{
return
lhs.
resolvable
() < rhs.
resolvable
(); }
244
246
}
// namespace zypp
248
#endif // ZYPP_POOLITEM_H
zypp
PoolItem.h
Generated by
1.8.1