#include <SelState.h>
Public Member Functions | |
SelState () | |
~SelState () | |
void | set_has_installed (bool b=true) |
void | set_has_candidate (bool b=true) |
bool | has_object () const |
bool | has_installed () const |
bool | has_candidate () const |
bool | has_both_objects () const |
bool | has_installed_only () const |
bool | has_candidate_only () const |
bool | to_modify () const |
bool | to_delete () const |
bool | to_install () const |
bool | by_user () const |
bool | by_appl () const |
bool | by_auto () const |
bool | is_taboo () const |
bool | is_srcins () const |
bool | user_unset (const bool doit) |
bool | user_set_delete (const bool doit) |
bool | user_set_install (const bool doit) |
bool | user_set_taboo (const bool doit) |
bool | user_clr_taboo (const bool doit) |
bool | user_set_srcins (const bool doit) |
bool | user_clr_srcins (const bool doit) |
bool | appl_unset (const bool doit) |
bool | appl_set_delete (const bool doit) |
bool | appl_set_install (const bool doit) |
bool | auto_unset (const bool doit) |
bool | auto_set_delete (const bool doit) |
bool | auto_set_install (const bool doit) |
Private Types | |
typedef uint8_t | bits |
Private Member Functions | |
void | set (const bits mask_r) |
void | clr (const bits mask_r) |
Private Attributes | |
bits | _bits |
Static Private Attributes | |
const bits | B_IS_I = 0x01 |
const bits | B_IS_C = 0x02 |
const bits | B_TO_DEL = 0x04 |
const bits | B_TO_INS = 0x08 |
const bits | B_BY_USER = 0x10 |
const bits | B_BY_APPL = 0x20 |
const bits | B_F_TABOO = 0x40 |
const bits | B_F_SRCINS = 0x80 |
const bits | M_IS = B_IS_I | B_IS_C |
const bits | M_TO = B_TO_DEL | B_TO_INS |
const bits | M_BY = B_BY_USER | B_BY_APPL |
Friends | |
std::ostream & | operator<< (std::ostream &str, const SelState &obj) |
bool | operator== (const SelState &lhs, const SelState &rhs) |
bool | operator!= (const SelState &lhs, const SelState &rhs) |
Note: taboo locks the state to no modification
. This applies to all modification reqests except user_set_delete
, user_set_install
and user_clr_taboo
, which perforn and unset taboo. user_unset
keeps taboo.
|
Bits representing a PMSelectables state |
|
|
|
|
|
Application request to delete the installed object. Fails if no installed object is present, or user requested install or taboo. |
|
Application request to install the candidate object. Fails if no candidate object is present, or user requested delete or taboo. |
|
Application request to clear state (neither delete nor install). Fails if user requested modification. |
|
Auto request to delete the installed object. Fails if no installed object is present, or user/appl requested install or taboo. |
|
Auto request to install the candidate object. Fails if no candidate object is present, or user/appl requested delete or taboo. |
|
Auto request to clear state (neither delete nor install). Fails if user/appl requested modification. |
|
True if modification was requested by application |
|
True if modification was auto requested |
|
True if modification was requested by user |
|
clear bits in mask_ |
|
True if installed and candidate object is present |
|
True if candidate object is present |
|
True if candidate object is present but no installed. |
|
True if installed object is present |
|
True if installed object is present but no candidate. |
|
True if either installed or candidate object is present |
|
True if install sources flag is set. |
|
True if no modification allowed by user. |
|
set bits in mask |
|
Set whether a candidate object is present |
|
Set whether an installed object is present. Clears taboo if an installed object occurs or vanishes. Otherwise an e.g. formerly unwanted package that got somehow installed, would become protected. Thats not what we want per default. |
|
True if to delete |
|
True if to install |
|
True if either to delete or to install |
|
Clear install sources flag. |
|
Clear taboo flag. |
|
User request to delete the installed object. Fails if no installed object is present (clears taboo). |
|
User request to install the candidate object. Fails if no candidate object is present (clears taboo). |
|
Set install sources flag. |
|
No modification allowed by user. |
|
User request to clear state (neither delete nor install) (keeps taboo). |
|
|
|
|
|
|
|
bits representing a PMSelectables state |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|