libzypp 17.31.23
|
Status bitfield. More...
#include <ResStatus.h>
Public Types | |
BitField range definitions. | |
| |
typedef uint16_t | FieldType |
typedef bit::BitField< FieldType > | BitFieldType |
typedef bit::Range< FieldType, 0, 1 > | StateField |
typedef bit::Range< FieldType, StateField::end, 2 > | ValidateField |
typedef bit::Range< FieldType, ValidateField::end, 2 > | TransactField |
typedef bit::Range< FieldType, TransactField::end, 2 > | TransactByField |
typedef bit::Range< FieldType, TransactByField::end, 2 > | TransactDetailField |
typedef bit::Range< FieldType, TransactDetailField::end, 1 > | LicenceConfirmedField |
typedef bit::Range< FieldType, LicenceConfirmedField::end, 4 > | WeakField |
typedef bit::Range< FieldType, WeakField::end, 1 > | UserLockQueryField |
Friends | |
std::ostream & | operator<< (std::ostream &str, const ResStatus &obj) |
bool | operator== (const ResStatus &lhs, const ResStatus &rhs) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const ResStatus &obj) |
Stream output. | |
std::ostream & | operator<< (std::ostream &str, ResStatus::TransactValue obj) |
Stream output. | |
std::ostream & | operator<< (std::ostream &str, ResStatus::TransactByValue obj) |
Stream output. | |
bool | operator== (const ResStatus &lhs, const ResStatus &rhs) |
bool | operator!= (const ResStatus &lhs, const ResStatus &rhs) |
Status values. | |
Each enum corresponds to a BitField range.
| |
enum | StateValue { UNINSTALLED = bit::RangeValue<StateField,0>::value , INSTALLED = bit::RangeValue<StateField,1>::value } |
enum | ValidateValue { UNDETERMINED = bit::RangeValue<ValidateField,0>::value , BROKEN = bit::RangeValue<ValidateField,1>::value , SATISFIED = bit::RangeValue<ValidateField,2>::value , NONRELEVANT = bit::RangeValue<ValidateField,3>::value } |
enum | TransactValue { KEEP_STATE = bit::RangeValue<TransactField,0>::value , LOCKED = bit::RangeValue<TransactField,1>::value , TRANSACT = bit::RangeValue<TransactField,2>::value } |
enum | TransactByValue { SOLVER = bit::RangeValue<TransactByField,0>::value , APPL_LOW = bit::RangeValue<TransactByField,1>::value , APPL_HIGH = bit::RangeValue<TransactByField,2>::value , USER = bit::RangeValue<TransactByField,3>::value } |
enum | DetailValue { NO_DETAIL = bit::RangeValue<TransactDetailField,0>::value } |
enum | InstallDetailValue { EXPLICIT_INSTALL = bit::RangeValue<TransactDetailField,0>::value , SOFT_INSTALL = bit::RangeValue<TransactDetailField,1>::value } |
enum | RemoveDetailValue { EXPLICIT_REMOVE = bit::RangeValue<TransactDetailField,0>::value , SOFT_REMOVE = bit::RangeValue<TransactDetailField,1>::value , DUE_TO_OBSOLETE = bit::RangeValue<TransactDetailField,2>::value , DUE_TO_UPGRADE = bit::RangeValue<TransactDetailField,3>::value } |
enum | LicenceConfirmedValue { LICENCE_UNCONFIRMED = bit::RangeValue<LicenceConfirmedField,0>::value , LICENCE_CONFIRMED = bit::RangeValue<LicenceConfirmedField,1>::value } |
enum | WeakValue { NO_WEAK = bit::RangeValue<WeakField,0>::value , SUGGESTED = bit::RangeValue<WeakField,1<<0>::value , RECOMMENDED = bit::RangeValue<WeakField,1<<1>::value , ORPHANED = bit::RangeValue<WeakField,1<<2>::value , UNNEEDED = bit::RangeValue<WeakField,1<<3>::value } |
enum | UserLockQuery { USERLOCK_NOMATCH = bit::RangeValue<UserLockQueryField,0>::value , USERLOCK_MATCH = bit::RangeValue<UserLockQueryField,1>::value } |
ResStatus () | |
Default ctor. | |
ResStatus (bool isInstalled_r) | |
Ctor setting the initial . | |
~ResStatus () | |
Dtor. | |
BitFieldType | bitfield () const |
Debug helper returning the bitfield. | |
bool | isLicenceConfirmed () const |
void | setLicenceConfirmed (bool toVal_r=true) |
bool | isRecommended () const |
bool | isSuggested () const |
bool | isOrphaned () const |
bool | isUnneeded () const |
bool | hasWeak () const |
void | resetWeak () |
void | setRecommended (bool toVal_r=true) |
void | setSuggested (bool toVal_r=true) |
void | setOrphaned (bool toVal_r=true) |
void | setUnneeded (bool toVal_r=true) |
ValidateValue | validate () const |
bool | isUndetermined () const |
bool | isSatisfied () const |
bool | isBroken () const |
bool | isNonRelevant () const |
std::string | validateValueAsString () const |
bool | isInstalled () const |
bool | isUninstalled () const |
bool | staysInstalled () const |
bool | wasInstalled () const |
bool | isToBeInstalled () const |
bool | staysUninstalled () const |
bool | wasUninstalled () const |
bool | isToBeUninstalled () const |
bool | isLocked () const |
bool | isUserLocked () const |
bool | isSoftLocked () const |
bool | isKept () const |
bool | transacts () const |
TransactValue | getTransactValue () const |
bool | onSystem () const |
True if would be on system after commit. | |
bool | offSystem () const |
True if would be off system after commit. | |
bool | isBySolver () const |
bool | isByApplLow () const |
bool | isByApplHigh () const |
bool | isByUser () const |
TransactByValue | getTransactByValue () const |
bool | setTransactByValue (TransactByValue causer) |
bool | isToBeUninstalledDueToObsolete () const |
bool | isToBeUninstalledDueToUpgrade () const |
bool | isToBeInstalledSoft () const |
bool | isToBeInstalledNotSoft () const |
bool | isToBeUninstalledSoft () const |
static std::string | validateValueAsString (ValidateValue val_r) |
ValidateValue to string used in the history file. | |
static ValidateValue | stringToValidateValue (const std::string &str_r) |
ValidateValue from string used in the history file. | |
Builtin ResStatus constants. | |
class | resstatus::StatusBackup |
static const ResStatus | toBeInstalled |
static const ResStatus | toBeUninstalled |
static const ResStatus | toBeUninstalledDueToUpgrade |
static const ResStatus | toBeUninstalledDueToObsolete |
BitFieldType | _bitfield |
ResStatus (StateValue s, ValidateValue v=UNDETERMINED, TransactValue t=KEEP_STATE, InstallDetailValue i=EXPLICIT_INSTALL, RemoveDetailValue r=EXPLICIT_REMOVE) | |
Ctor for intialization of builtin constants. | |
template<class TField > | |
bool | fieldValueIs (FieldType val_r) const |
Return whether the corresponding Field has value val_r. | |
template<class TField > | |
void | fieldValueAssign (FieldType val_r) |
Set the corresponding Field to value val_r. | |
template<class TField > | |
bool | isGreaterThan (FieldType val_r) |
compare two values. | |
template<class TField > | |
bool | isLessThan (FieldType val_r) |
Status bitfield.
StateField
Whether the resolvable is or uninstalled (available). ValidateField
Validate status computed by the solver as nonrelevant: it is unimportant for the user satisfied: it important nothing has to be done broken: it is incomplete. So e.g. an update is needed TransactField
Whether to transact this resolvable (delete if installed install if uninstalled). In case the resolvable is locked, only USER may modify the transact bit. TransactByField
Who triggered the transaction. Transaction bit may be reset by higer levels only. TransactDetailField
Reason why the Resolvable transacts. Splitted into InstallDetailValue
and RemoveDetailValue
dependent on the kind of transaction. WeakField
The solvable will be recommended/suggested by a to be installed/deleted solvable. Definition at line 53 of file ResStatus.h.
typedef uint16_t zypp::ResStatus::FieldType |
Definition at line 65 of file ResStatus.h.
Definition at line 66 of file ResStatus.h.
typedef bit::Range<FieldType,0, 1> zypp::ResStatus::StateField |
Definition at line 68 of file ResStatus.h.
Definition at line 69 of file ResStatus.h.
Definition at line 70 of file ResStatus.h.
Definition at line 71 of file ResStatus.h.
Definition at line 72 of file ResStatus.h.
Definition at line 73 of file ResStatus.h.
Definition at line 74 of file ResStatus.h.
Definition at line 75 of file ResStatus.h.
Enumerator | |
---|---|
UNINSTALLED | |
INSTALLED |
Definition at line 88 of file ResStatus.h.
Enumerator | |
---|---|
UNDETERMINED | |
BROKEN | |
SATISFIED | |
NONRELEVANT |
Definition at line 93 of file ResStatus.h.
Enumerator | |
---|---|
KEEP_STATE | |
LOCKED | |
TRANSACT |
Definition at line 100 of file ResStatus.h.
Enumerator | |
---|---|
SOLVER | |
APPL_LOW | |
APPL_HIGH | |
USER |
Definition at line 106 of file ResStatus.h.
Enumerator | |
---|---|
NO_DETAIL | Detail for no transact, i.e. reset any Install/RemoveDetailValue. |
Definition at line 114 of file ResStatus.h.
Enumerator | |
---|---|
EXPLICIT_INSTALL | |
SOFT_INSTALL |
Definition at line 119 of file ResStatus.h.
Enumerator | |
---|---|
EXPLICIT_REMOVE | |
SOFT_REMOVE | |
DUE_TO_OBSOLETE | |
DUE_TO_UPGRADE |
Definition at line 124 of file ResStatus.h.
Enumerator | |
---|---|
LICENCE_UNCONFIRMED | |
LICENCE_CONFIRMED |
Definition at line 132 of file ResStatus.h.
Enumerator | |
---|---|
NO_WEAK | |
SUGGESTED | |
RECOMMENDED | |
ORPHANED | |
UNNEEDED |
Definition at line 138 of file ResStatus.h.
Enumerator | |
---|---|
USERLOCK_NOMATCH | |
USERLOCK_MATCH |
Definition at line 147 of file ResStatus.h.
zypp::ResStatus::ResStatus | ( | ) |
Default ctor.
Definition at line 33 of file ResStatus.cc.
zypp::ResStatus::ResStatus | ( | bool | isInstalled_r | ) |
Ctor setting the initial .
Definition at line 41 of file ResStatus.cc.
zypp::ResStatus::~ResStatus | ( | ) |
Dtor.
Definition at line 50 of file ResStatus.cc.
|
private |
Ctor for intialization of builtin constants.
Definition at line 54 of file ResStatus.cc.
|
inline |
Debug helper returning the bitfield.
It's save to expose the bitfield, as it can't be used to recreate a ResStatus. So it is not possible to bypass transition rules.
Definition at line 170 of file ResStatus.h.
|
inline |
Definition at line 175 of file ResStatus.h.
|
inline |
Definition at line 178 of file ResStatus.h.
|
inline |
Definition at line 182 of file ResStatus.h.
|
inline |
Definition at line 185 of file ResStatus.h.
|
inline |
Definition at line 188 of file ResStatus.h.
|
inline |
Definition at line 191 of file ResStatus.h.
|
inline |
Definition at line 194 of file ResStatus.h.
|
inline |
Definition at line 197 of file ResStatus.h.
|
inline |
Definition at line 200 of file ResStatus.h.
|
inline |
Definition at line 203 of file ResStatus.h.
|
inline |
Definition at line 206 of file ResStatus.h.
|
inline |
Definition at line 209 of file ResStatus.h.
|
inline |
Definition at line 213 of file ResStatus.h.
|
inline |
Definition at line 216 of file ResStatus.h.
|
inline |
Definition at line 219 of file ResStatus.h.
|
inline |
Definition at line 222 of file ResStatus.h.
|
inline |
Definition at line 225 of file ResStatus.h.
|
inline |
Definition at line 228 of file ResStatus.h.
|
static |
ValidateValue to string used in the history file.
Definition at line 75 of file ResStatus.cc.
|
static |
ValidateValue from string used in the history file.
Definition at line 88 of file ResStatus.cc.
|
inline |
Definition at line 240 of file ResStatus.h.
|
inline |
Definition at line 243 of file ResStatus.h.
|
inline |
Definition at line 248 of file ResStatus.h.
|
inline |
Definition at line 251 of file ResStatus.h.
|
inline |
Definition at line 253 of file ResStatus.h.
|
inline |
Definition at line 256 of file ResStatus.h.
|
inline |
Definition at line 259 of file ResStatus.h.
|
inline |
Definition at line 261 of file ResStatus.h.
|
inline |
Definition at line 264 of file ResStatus.h.
|
inline |
Definition at line 267 of file ResStatus.h.
|
inline |
Definition at line 270 of file ResStatus.h.
|
inline |
Definition at line 273 of file ResStatus.h.
|
inline |
Definition at line 276 of file ResStatus.h.
|
inline |
Definition at line 279 of file ResStatus.h.
|
inline |
True if would be on system after commit.
Definition at line 283 of file ResStatus.h.
|
inline |
True if would be off system after commit.
Definition at line 287 of file ResStatus.h.
|
inline |
Definition at line 290 of file ResStatus.h.
|
inline |
Definition at line 293 of file ResStatus.h.
|
inline |
Definition at line 296 of file ResStatus.h.
|
inline |
Definition at line 299 of file ResStatus.h.
|
inline |
Definition at line 302 of file ResStatus.h.
|
inline |
Definition at line 305 of file ResStatus.h.
|
inline |
Definition at line 315 of file ResStatus.h.
|
inline |
Definition at line 318 of file ResStatus.h.
|
inline |
Definition at line 321 of file ResStatus.h.
|
inline |
Definition at line 324 of file ResStatus.h.
|
inline |
Definition at line 327 of file ResStatus.h.
|
inlineprivate |
Definition at line 335 of file ResStatus.h.
|
inline |
Definition at line 339 of file ResStatus.h.
|
inline |
Set TransactValue.
Convenience to set TransactValue from enum.
Definition at line 357 of file ResStatus.h.
|
inline |
Definition at line 374 of file ResStatus.h.
|
inline |
Apply a lock (prevent transaction).
Currently by USER or APPL_HIGH only, but who knows... Set LOCKED from KEEP_STATE to be sure all transaction details were reset properly.
Definition at line 387 of file ResStatus.h.
|
inline |
Definition at line 419 of file ResStatus.h.
|
inline |
Toggle between TRANSACT and KEEP_STATE.
LOCKED state means KEEP_STATE. But in contrary to KEEP_STATE, LOCKED state is immutable for causer_r less than TransactByValue. KEEP_STATE may be changed by any causer_r.
Definition at line 432 of file ResStatus.h.
|
inline |
Definition at line 463 of file ResStatus.h.
|
inline |
Definition at line 472 of file ResStatus.h.
|
inline |
Not the same as setTransact( false ).
Definition at line 484 of file ResStatus.h.
|
inline |
Soft toggle between TRANSACT and KEEP_STATE.
Similar to setTransact, but leaving KEEP_STATE also requires a superior causerLimit_r. So this is a kind of soft lock.
Definition at line 502 of file ResStatus.h.
|
inline |
Definition at line 515 of file ResStatus.h.
|
inline |
Definition at line 518 of file ResStatus.h.
|
inline |
Definition at line 527 of file ResStatus.h.
|
inline |
Definition at line 530 of file ResStatus.h.
|
inline |
Definition at line 536 of file ResStatus.h.
|
inline |
Definition at line 544 of file ResStatus.h.
|
inline |
Definition at line 550 of file ResStatus.h.
|
inline |
Definition at line 561 of file ResStatus.h.
|
inline |
Definition at line 568 of file ResStatus.h.
|
inline |
Definition at line 575 of file ResStatus.h.
|
inline |
Definition at line 585 of file ResStatus.h.
|
inline |
Definition at line 595 of file ResStatus.h.
|
inline |
Definition at line 603 of file ResStatus.h.
|
inline |
Definition at line 607 of file ResStatus.h.
Definition at line 611 of file ResStatus.h.
Definition at line 616 of file ResStatus.h.
|
inline |
Definition at line 621 of file ResStatus.h.
|
inline |
Definition at line 627 of file ResStatus.h.
|
inline |
Definition at line 633 of file ResStatus.h.
|
inline |
Definition at line 639 of file ResStatus.h.
Definition at line 645 of file ResStatus.h.
Return whether the corresponding Field has value val_r.
Definition at line 678 of file ResStatus.h.
|
inlineprivate |
Set the corresponding Field to value val_r.
Definition at line 684 of file ResStatus.h.
compare two values.
Definition at line 690 of file ResStatus.h.
Definition at line 694 of file ResStatus.h.
|
friend |
Definition at line 333 of file ResStatus.h.
|
friend |
Definition at line 698 of file ResStatus.h.
|
friend |
Definition at line 102 of file ResStatus.cc.
|
related |
Stream output.
Definition at line 102 of file ResStatus.cc.
|
related |
Stream output.
Definition at line 133 of file ResStatus.cc.
|
related |
Stream output.
Definition at line 144 of file ResStatus.cc.
Definition at line 713 of file ResStatus.h.
Definition at line 717 of file ResStatus.h.
|
static |
Definition at line 661 of file ResStatus.h.
|
static |
Definition at line 662 of file ResStatus.h.
|
static |
Definition at line 663 of file ResStatus.h.
|
static |
Definition at line 664 of file ResStatus.h.
|
private |
Definition at line 699 of file ResStatus.h.