/** * \file FuncStatus.C * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * * \author Jean-Marc Lasgouttes * * Full author contact details are available in file CREDITS. */ #include #include "FuncStatus.h" FuncStatus::FuncStatus() : v_(OK) { } void FuncStatus::clear() { v_ = OK; } void FuncStatus::operator|=(FuncStatus const & f) { v_ |= f.v_; } void FuncStatus::unknown(bool b) { if (b) v_ |= UNKNOWN; else v_ &= !UNKNOWN; } bool FuncStatus::unknown() const { return (v_ & UNKNOWN); } void FuncStatus::disabled(bool b) { if (b) v_ |= DISABLED; else v_ &= !DISABLED; } bool FuncStatus::disabled() const { return (v_ & DISABLED); } void FuncStatus::setOnOff(bool b) { v_ |= (b ? ON : OFF); } bool FuncStatus::onoff(bool b) const { if (b) return (v_ & ON); else return (v_ & OFF); }