namespace resstatus
{
- class UserLockQueryManip;
+ struct UserLockQueryManip;
class StatusBackup;
}
* 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
- * \li \c TransactField Wheter to transact this resolvable
+ * \li \c 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.
bool isUnneeded() const
{ return _bitfield.test( UNNEEDED ); }
+ bool hasWeak() const
+ { return ! fieldValueIs<WeakField>( NO_WEAK ); }
+
void resetWeak()
{ return fieldValueAssign<WeakField>( NO_WEAK ); }
bool isNonRelevant() const
{ return fieldValueIs<ValidateField>( NONRELEVANT ); }
+ std::string validateValueAsString() const
+ { return validateValueAsString( validate() ); }
+
+ /** ValidateValue to string used in the history file. */
+ static std::string validateValueAsString( ValidateValue val_r );
+
+ /** ValidateValue from string used in the history file. */
+ static ValidateValue stringToValidateValue( const std::string & str_r );
+
public:
// These two are IMMUTABLE!
/** \name Internal hard lock maintainance */
//@{
- friend class resstatus::UserLockQueryManip;
+ friend struct resstatus::UserLockQueryManip;
bool isUserLockQueryMatch() const
{ return fieldValueIs<UserLockQueryField>( USERLOCK_MATCH ); }
/** Return whether the corresponding Field has value \a val_r.
*/
- template<class _Field>
+ template<class TField>
bool fieldValueIs( FieldType val_r ) const
- { return _bitfield.isEqual<_Field>( val_r ); }
+ { return _bitfield.isEqual<TField>( val_r ); }
/** Set the corresponding Field to value \a val_r.
*/
- template<class _Field>
+ template<class TField>
void fieldValueAssign( FieldType val_r )
- { _bitfield.assign<_Field>( val_r ); }
+ { _bitfield.assign<TField>( val_r ); }
/** compare two values.
*/
- template<class _Field>
+ template<class TField>
bool isGreaterThan( FieldType val_r )
- { return _bitfield.value<_Field>() > val_r; }
+ { return _bitfield.value<TField>() > val_r; }
- template<class _Field>
+ template<class TField>
bool isLessThan( FieldType val_r )
- { return _bitfield.value<_Field>() < val_r; }
+ { return _bitfield.value<TField>() < val_r; }
private:
friend class resstatus::StatusBackup;