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
Edition.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
12
#ifndef ZYPP_EDITION_H
13
#define ZYPP_EDITION_H
14
15
#include <iosfwd>
16
#include <string>
17
#include <functional>
18
19
#include "
zypp/IdStringType.h
"
20
#include "
zypp/RelCompare.h
"
21
#include "
zypp/Range.h
"
22
24
namespace
zypp
25
{
26
28
//
29
// CLASS NAME : Edition
30
//
60
class
Edition
:
public
IdStringType
<Edition>
61
{
62
public
:
64
typedef
unsigned
epoch_t
;
65
67
static
const
epoch_t
noepoch
= 0;
68
73
static
const
Edition
noedition
;
74
75
public
:
77
Edition
() {}
78
80
explicit
Edition
(
IdString::IdType
id_r ) :
_str
( id_r ) {}
81
explicit
Edition
(
const
IdString
& idstr_r ) :
_str
( idstr_r ) {}
82
explicit
Edition
(
const
std::string & str_r ) :
_str
( str_r ) {}
83
explicit
Edition
(
const
char
* cstr_r ) :
_str
( cstr_r ) {}
84
86
Edition
(
const
std::string & version_r,
87
const
std::string & release_r,
88
epoch_t
epoch_r =
noepoch
);
90
Edition
(
const
char
* version_r,
91
const
char
* release_r,
92
epoch_t
epoch_r =
noepoch
);
93
95
Edition
(
const
std::string & version_r,
96
const
std::string & release_r,
97
const
std::string & epoch_r );
99
Edition
(
const
char
* version_r,
100
const
char
* release_r,
101
const
char
* epoch_r );
102
103
public
:
105
epoch_t
epoch
()
const
;
106
108
std::string
version
()
const
;
109
111
std::string
release
()
const
;
112
113
public
:
117
typedef
zypp::Compare<Edition>
Compare
;
118
122
typedef
Range<Edition>
CompareRange
;
123
124
public
:
130
static
int
match
(
const
Edition
& lhs,
const
Edition
& rhs ) {
return
match
( lhs.
idStr
(), rhs.
idStr
() ); }
131
static
int
match
(
const
Edition
& lhs,
const
IdString
& rhs ) {
return
match
( lhs.
idStr
(), rhs ); }
132
static
int
match
(
const
Edition
& lhs,
const
std::string & rhs ) {
return
_doMatch
( lhs.
c_str
(), rhs.c_str() ); }
133
static
int
match
(
const
Edition
& lhs,
const
char
* rhs ) {
return
_doMatch
( lhs.
c_str
(), rhs );}
134
135
static
int
match
(
const
IdString
& lhs,
const
Edition
& rhs ) {
return
match
( lhs, rhs.
idStr
() ); }
136
static
int
match
(
const
IdString
& lhs,
const
IdString
& rhs ) {
return
lhs.
compareEQ
( rhs ) ? 0 :
137
_doMatch
( lhs.
c_str
(), rhs.
c_str
() ); }
138
static
int
match
(
const
IdString
& lhs,
const
std::string & rhs ) {
return
_doMatch
( lhs.
c_str
(), rhs.c_str() ); }
139
static
int
match
(
const
IdString
& lhs,
const
char
* rhs ) {
return
_doMatch
( lhs.
c_str
(), rhs ); }
140
141
static
int
match
(
const
std::string & lhs,
const
Edition
& rhs ) {
return
_doMatch
( lhs.c_str(), rhs.
c_str
() );}
142
static
int
match
(
const
std::string & lhs,
const
IdString
& rhs ) {
return
_doMatch
( lhs.c_str(), rhs.
c_str
() ); }
143
static
int
match
(
const
std::string & lhs,
const
std::string & rhs ) {
return
_doMatch
( lhs.c_str(), rhs.c_str() ); }
144
static
int
match
(
const
std::string & lhs,
const
char
* rhs ) {
return
_doMatch
( lhs.c_str(), rhs ); }
145
146
static
int
match
(
const
char
* lhs,
const
Edition
& rhs ) {
return
_doMatch
( lhs, rhs.
c_str
() );}
147
static
int
match
(
const
char
* lhs,
const
IdString
& rhs ) {
return
_doMatch
( lhs, rhs.
c_str
() ); }
148
static
int
match
(
const
char
* lhs,
const
std::string & rhs ) {
return
_doMatch
( lhs, rhs.c_str() ); }
149
static
int
match
(
const
char
* lhs,
const
char
* rhs ) {
return
_doMatch
( lhs, rhs ); }
150
151
int
match
(
const
Edition
& rhs )
const
{
return
match
(
idStr
(), rhs.
idStr
() ); }
152
int
match
(
const
IdString
& rhs )
const
{
return
match
(
idStr
(), rhs ); }
153
int
match
(
const
std::string & rhs )
const
{
return
_doMatch
(
c_str
(), rhs.c_str() ); }
154
int
match
(
const
char
* rhs )
const
{
return
_doMatch
(
c_str
(), rhs ); }
156
160
struct
Match
:
public
std::binary_function<Edition,Edition,int>
161
{
162
int
operator()
(
const
Edition
& lhs,
const
Edition
& rhs )
const
163
{
return
Edition::match
( lhs, rhs ); }
164
};
165
169
typedef
Range<Edition, Match>
MatchRange
;
170
171
private
:
172
static
int
_doCompare
(
const
char
* lhs,
const
char
* rhs );
173
static
int
_doMatch
(
const
char
* lhs,
const
char
* rhs );
174
175
private
:
176
friend
class
IdStringType
<
Edition
>;
177
IdString
_str
;
178
};
180
182
}
// namespace zypp
184
#endif // ZYPP_EDITION_H
zypp
Edition.h
Generated by
1.8.1