#include "FuncStatus.h"
+using std::string;
+
FuncStatus::FuncStatus() : v_(OK)
{
}
void FuncStatus::clear()
{
v_ = OK;
+ message_.erase();
}
void FuncStatus::operator|=(FuncStatus const & f)
{
v_ |= f.v_;
+ if (!f.message_.empty())
+ message_ = f.message_;
}
}
-void FuncStatus::disabled(bool b)
+void FuncStatus::enabled(bool b)
{
if (b)
- v_ |= DISABLED;
- else
v_ &= !DISABLED;
+ else
+ v_ |= DISABLED;
}
-bool FuncStatus::disabled() const
+bool FuncStatus::enabled() const
{
- return (v_ & DISABLED);
+ return !(v_ & DISABLED);
}
else
return (v_ & OFF);
}
+
+
+void FuncStatus::message(string const & m)
+{
+ message_ = m;
+}
+
+
+string const & FuncStatus::message() const
+{
+ return message_;
+}