Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

SelState Class Reference

Bits representing a PMSelectables state. More...

#include <SelState.h>

List of all members.

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)


Detailed Description

Bits representing a PMSelectables state.

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.


Member Typedef Documentation

typedef uint8_t SelState::bits [private]
 

Bits representing a PMSelectables state


Constructor & Destructor Documentation

SelState::SelState  ) 
 

SelState::~SelState  ) 
 


Member Function Documentation

bool SelState::appl_set_delete const bool  doit  ) 
 

Application request to delete the installed object. Fails if no installed object is present, or user requested install or taboo.

bool SelState::appl_set_install const bool  doit  ) 
 

Application request to install the candidate object. Fails if no candidate object is present, or user requested delete or taboo.

bool SelState::appl_unset const bool  doit  ) 
 

Application request to clear state (neither delete nor install). Fails if user requested modification.

bool SelState::auto_set_delete const bool  doit  ) 
 

Auto request to delete the installed object. Fails if no installed object is present, or user/appl requested install or taboo.

bool SelState::auto_set_install const bool  doit  ) 
 

Auto request to install the candidate object. Fails if no candidate object is present, or user/appl requested delete or taboo.

bool SelState::auto_unset const bool  doit  ) 
 

Auto request to clear state (neither delete nor install). Fails if user/appl requested modification.

bool SelState::by_appl  )  const [inline]
 

True if modification was requested by application

bool SelState::by_auto  )  const [inline]
 

True if modification was auto requested

bool SelState::by_user  )  const [inline]
 

True if modification was requested by user

void SelState::clr const bits  mask_r  )  [inline, private]
 

clear bits in mask_

bool SelState::has_both_objects  )  const [inline]
 

True if installed and candidate object is present

bool SelState::has_candidate  )  const [inline]
 

True if candidate object is present

bool SelState::has_candidate_only  )  const [inline]
 

True if candidate object is present but no installed.

bool SelState::has_installed  )  const [inline]
 

True if installed object is present

bool SelState::has_installed_only  )  const [inline]
 

True if installed object is present but no candidate.

bool SelState::has_object  )  const [inline]
 

True if either installed or candidate object is present

bool SelState::is_srcins  )  const [inline]
 

True if install sources flag is set.

bool SelState::is_taboo  )  const [inline]
 

True if no modification allowed by user.

void SelState::set const bits  mask_r  )  [inline, private]
 

set bits in mask

void SelState::set_has_candidate bool  b = true  ) 
 

Set whether a candidate object is present

void SelState::set_has_installed bool  b = true  ) 
 

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.

bool SelState::to_delete  )  const [inline]
 

True if to delete

bool SelState::to_install  )  const [inline]
 

True if to install

bool SelState::to_modify  )  const [inline]
 

True if either to delete or to install

bool SelState::user_clr_srcins const bool  doit  ) 
 

Clear install sources flag.

bool SelState::user_clr_taboo const bool  doit  ) 
 

Clear taboo flag.

bool SelState::user_set_delete const bool  doit  ) 
 

User request to delete the installed object. Fails if no installed object is present (clears taboo).

bool SelState::user_set_install const bool  doit  ) 
 

User request to install the candidate object. Fails if no candidate object is present (clears taboo).

bool SelState::user_set_srcins const bool  doit  ) 
 

Set install sources flag.

bool SelState::user_set_taboo const bool  doit  ) 
 

No modification allowed by user.

bool SelState::user_unset const bool  doit  ) 
 

User request to clear state (neither delete nor install) (keeps taboo).


Friends And Related Function Documentation

bool operator!= const SelState lhs,
const SelState rhs
[friend]
 

std::ostream& operator<< std::ostream &  str,
const SelState obj
[friend]
 

bool operator== const SelState lhs,
const SelState rhs
[friend]
 


Member Data Documentation

bits SelState::_bits [private]
 

bits representing a PMSelectables state

const bits SelState::B_BY_APPL = 0x20 [static, private]
 

const bits SelState::B_BY_USER = 0x10 [static, private]
 

const bits SelState::B_F_SRCINS = 0x80 [static, private]
 

const bits SelState::B_F_TABOO = 0x40 [static, private]
 

const bits SelState::B_IS_C = 0x02 [static, private]
 

const bits SelState::B_IS_I = 0x01 [static, private]
 

const bits SelState::B_TO_DEL = 0x04 [static, private]
 

const bits SelState::B_TO_INS = 0x08 [static, private]
 

const bits SelState::M_BY = B_BY_USER | B_BY_APPL [static, private]
 

const bits SelState::M_IS = B_IS_I | B_IS_C [static, private]
 

const bits SelState::M_TO = B_TO_DEL | B_TO_INS [static, private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 14:30:33 2007 for yast2-packagemanager by doxygen 1.3.6