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
Capabilities.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_SAT_CAPABILITIES_H
13
#define ZYPP_SAT_CAPABILITIES_H
14
15
#include <iosfwd>
16
17
#include "
zypp/base/DefaultIntegral.h
"
18
#include "
zypp/sat/detail/PoolMember.h
"
19
#include "
zypp/Capability.h
"
20
22
namespace
zypp
23
{
24
26
//
27
// CLASS NAME : Capabilities
28
//
35
class
Capabilities
36
{
37
public
:
38
typedef
Capability
value_type
;
39
typedef
unsigned
size_type
;
40
41
enum
Mode
{
SKIP_TO_INTERNAL
};
42
43
public
:
45
Capabilities
()
46
:
_begin
( 0 )
47
{}
48
50
explicit
51
Capabilities
(
const
sat::detail::IdType
* base_r )
52
:
_begin
( base_r )
53
{}
54
58
Capabilities
(
const
sat::detail::IdType
* base_r,
sat::detail::IdType
skip_r );
59
60
public
:
62
bool
empty
()
const
63
{
return
! (
_begin
&& *
_begin
); }
64
66
size_type
size
()
const
;
67
68
public
:
69
class
const_iterator;
70
72
const_iterator
begin
()
const
;
73
75
const_iterator
end
()
const
;
76
77
private
:
78
const
sat::detail::IdType
*
_begin
;
79
};
81
83
std::ostream &
operator<<
( std::ostream & str,
const
Capabilities
& obj );
84
86
//
87
// CLASS NAME : Capabilities::const_iterator
88
//
91
class
Capabilities::const_iterator
:
public
boost::iterator_adaptor<
92
const_iterator
// Derived
93
, const sat::detail::IdType *
// Base
94
, const Capability
// Value
95
, boost::forward_traversal_tag
// CategoryOrTraversal
96
, const Capability
// Reference
97
>
98
{
99
public
:
100
const_iterator
()
101
:
const_iterator
::iterator_adaptor_( 0 )
102
{}
103
104
explicit
const_iterator
(
const
sat::detail::IdType
* _idx )
105
:
const_iterator
::iterator_adaptor_( _idx )
106
{
107
if
( base_reference() &&
sat::detail::isDepMarkerId
( *base_reference() ) )
108
{
109
_tagged
=
true
;
110
++base_reference();
111
}
112
}
113
114
public
:
132
bool
tagged
()
const
{
return
_tagged
; }
133
134
private
:
135
friend
class
boost::iterator_core_access
;
136
137
reference
dereference
()
const
138
{
return
( base() ) ?
Capability
( *base() ) :
Capability::Null
; }
139
140
template
<
class
OtherDerived,
class
OtherIterator,
class
V,
class
C,
class
R,
class
D>
141
bool
equal
(
const
boost::iterator_adaptor<OtherDerived, OtherIterator, V, C, R, D> & rhs )
const
142
{
// NULL pointer is eqal pointer to Id 0
143
return
( base() == rhs.base()
// includes both NULL...
144
|| ( !rhs.base() && !*base() )
145
|| ( !base() && !*rhs.base() ) );
146
}
147
148
void
increment
()
149
{
// jump over libsolvs internal ids.
150
if
(
sat::detail::isDepMarkerId
( *(++base_reference()) ) )
151
{
152
_tagged
=
true
;
153
++base_reference();
154
}
155
}
156
157
private
:
158
DefaultIntegral<bool,false>
_tagged
;
159
};
161
162
inline
Capabilities::const_iterator
Capabilities::begin
()
const
163
{
return
const_iterator
(
_begin
); }
164
165
inline
Capabilities::const_iterator
Capabilities::end
()
const
166
{
return
const_iterator
( 0 ); }
167
169
}
// namespace zypp
171
#endif // ZYPP_SAT_CAPABILITIES_H
zypp
Capabilities.h
Generated by
1.8.1