Files
DbMessaging/messaginglib/dbmsgfieldbase.cpp

39 lines
553 B
C++
Raw Permalink Normal View History

2018-09-15 20:49:15 +02:00
#include "dbmsgfieldbase.h"
DbMsgFieldBase::DbMsgFieldBase() :
m_hasValue(false), m_touched(false)
{
}
DbMsgFieldBase::~DbMsgFieldBase()
{
}
bool DbMsgFieldBase::hasValue() const
{
return m_hasValue;
}
void DbMsgFieldBase::clear()
{
m_hasValue = false;
}
bool DbMsgFieldBase::touched() const
{
return m_touched;
}
void DbMsgFieldBase::setTouched(bool touched)
{
m_touched = touched;
}
void DbMsgFieldBase::setHasValue(bool hasValue)
{
if(m_hasValue && !hasValue)
clear();
else
m_hasValue = hasValue;
}