12 #ifndef ZYPP_EDITION_H
13 #define ZYPP_EDITION_H
82 explicit Edition(
const std::string & str_r ) :
_str( str_r ) {}
86 Edition(
const std::string & version_r,
87 const std::string & release_r,
90 Edition(
const char * version_r,
91 const char * release_r,
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 );
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 ); }
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 ); }
160 struct Match:
public std::binary_function<Edition,Edition,int>
172 static int _doCompare(
const char * lhs,
const char * rhs );
173 static int _doMatch(
const char * lhs,
const char * rhs );
183 {
return str <<
"<edition"
184 <<
" epoch=\"" << obj.
epoch() <<
"\""
185 <<
" version=\"" << obj.
version() <<
"\""
186 <<
" release=\"" << obj.
release() <<
"\""
193 #endif // ZYPP_EDITION_H
static const epoch_t noepoch
Value representing noepoch.
zypp::Compare< Edition > Compare
compare functor.
static int _doMatch(const char *lhs, const char *rhs)
int match(const std::string &rhs) const
static int match(const char *lhs, const Edition &rhs)
std::string release() const
Release.
static int match(const char *lhs, const char *rhs)
static int match(const std::string &lhs, const IdString &rhs)
Range< Edition > CompareRange
Edition Range based on Compare.
Access to the sat-pools string space.
int match(const char *rhs) const
Edition represents [epoch:]version[-release]
static int match(const Edition &lhs, const IdString &rhs)
int match(const IdString &rhs) const
static int match(const IdString &lhs, const std::string &rhs)
unsigned epoch_t
Type of an epoch.
Base class for creating IdString based types.
Edition(const IdString &idstr_r)
static int _doCompare(const char *lhs, const char *rhs)
Edition(const char *cstr_r)
sat::detail::IdType IdType
static int match(const char *lhs, const std::string &rhs)
Edition()
Default ctor: noedition.
static int match(const IdString &lhs, const IdString &rhs)
static int match(const Edition &lhs, const Edition &rhs)
bool compareEQ(const IdString &rhs) const
Fast compare equal.
epoch_t epoch() const
Epoch.
std::string version() const
Version.
Range< Edition, Match > MatchRange
Edition Range based on Match.
int operator()(const Edition &lhs, const Edition &rhs) const
General compare functor returning -1, 0, 1.
const char * c_str() const
Conversion to const char *
const char * c_str() const
Edition(IdString::IdType id_r)
Ctor taking edition as string.
Edition(const std::string &str_r)
std::ostream & dumpAsXmlOn(std::ostream &str, const Edition &obj)
static int match(const char *lhs, const IdString &rhs)
static int match(const IdString &lhs, const Edition &rhs)
int match(const Edition &rhs) const
static int match(const Edition &lhs, const std::string &rhs)
static int match(const std::string &lhs, const char *rhs)
static int match(const IdString &lhs, const char *rhs)
static int match(const std::string &lhs, const Edition &rhs)
static int match(const std::string &lhs, const std::string &rhs)
const IdString & idStr() const
static int match(const Edition &lhs, const char *rhs)
static const Edition noedition
Value representing noedition ("") This is in fact a valid Edition.