[epoch:]version[-release].
More...
#include <PkgEdition.h>
Public Types | |
| enum | type_enum { NORMAL, MAXIMUM, UNSPEC } |
Public Member Functions | |
| PkgEdition (type_enum t=NORMAL) | |
| PkgEdition (const std::string &v, const std::string &r="", time_t bt=0) | |
| PkgEdition (const std::string &v, time_t bt) | |
| PkgEdition (unsigned e, const std::string &v, const std::string &r="", time_t bt=0) | |
| PkgEdition (unsigned e, const std::string &v, time_t bt) | |
| ~PkgEdition () | |
| const std::string & | version () const |
| const std::string & | release () const |
| int | epoch () const |
| bool | has_epoch () const |
| time_t | buildtime () const |
| bool | is_unspecified () const |
| bool | is_maximum () const |
| bool | compare (rel_op op, const PkgEdition &e2) const |
| bool | operator== (const PkgEdition &e2) const |
| bool | operator!= (const PkgEdition &e2) const |
| bool | operator< (const PkgEdition &e2) const |
| bool | operator<= (const PkgEdition &e2) const |
| bool | operator> (const PkgEdition &e2) const |
| bool | operator>= (const PkgEdition &e2) const |
| std::string | asString () const |
Static Public Member Functions | |
| static std::string | toString (const PkgEdition &t) |
| static PkgEdition | fromString (std::string s) |
Private Member Functions | |
| bool | edition_eq (const PkgEdition &e2) const |
| bool | edition_lt (const PkgEdition &e2) const |
| int | rpmvercmp (const std::string &a, const std::string &b) const |
| void | xconstruct (type_enum xtype, unsigned epoch, const std::string &v, const std::string &r, time_t buildtime) |
Private Attributes | |
| type_enum | _type |
| unsigned | _epoch |
| std::string | _version |
| std::string | _release |
| time_t | _buildtime |
Static Private Attributes | |
| static const std::string | _str_UNSPEC |
| static const std::string | _str_MAXIMUM |
Friends | |
| std::ostream & | operator<< (std::ostream &, const PkgEdition &) |
[epoch:]version[-release].
Syntax for specifying a PkgEdition:
[epoch:]version[-release]
epoch (optional) number, with assumed default of 0 if not supplied version (required) can contain any character except '-' release (optional) can contain any character except '-'
PkgEdition can also represent the special editions MAXIMUM (greater than all real editions) and UNSPEC (uncomparable).
PkgEdition may also contain a buildtime (optional, default of 0). On comparing PkgEditions the buildtime is taken into account, iff PkgEditions are equal and both contain a nonzero buildtime.
|
|
|
|
|
Constructor
|
|
||||||||||||||||
|
Constructor
|
|
||||||||||||
|
Constructor
|
|
||||||||||||||||||||
|
Constructor
|
|
||||||||||||||||
|
Constructor
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
Restore PkgEdition from string (on restore from file). Keep it compatible with toString. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Return -1,0,1 if versions are <,==,> |
|
|
Convert PkgEdition to string (on save to file). Keep it compatible with fromString. |
|
|
|
|
||||||||||||||||||||||||
|
Helper for Constructor
String form for an edition is
In constructors providing an 'int e' epoch value, an epoch part within the version string
In constructors providing an nonempty release string
Construct PkgEdition: epoch 3, version 1.0 release 1
PkgEdition( "3:1.0-1" )
PkgEdition( "3:1.0", "1" )
PkgEdition( 3, "1.0-1" )
PkgEdition( 3, "1.0", "1" )
Assert _version/_release are empty srings on MAXIMUM and UNSPEC type. |
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.4