2012-05-26 23:14:33 +00:00
|
|
|
#include "referenceinterface.hpp"
|
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
|
|
|
ReferenceInterface::ReferenceInterface()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-07-06 23:14:18 +00:00
|
|
|
ReferenceInterface::~ReferenceInterface()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-05-26 23:14:33 +00:00
|
|
|
void ReferenceInterface::checkReferenceAvailable()
|
|
|
|
{
|
2017-08-12 05:36:09 +00:00
|
|
|
// check if count of the reference has become 0
|
|
|
|
if (!mPtr.isEmpty() && mPtr.getRefData().getCount() == 0)
|
2013-03-31 13:50:48 +00:00
|
|
|
{
|
2013-04-21 19:24:48 +00:00
|
|
|
if (!mPtr.isEmpty())
|
|
|
|
{
|
|
|
|
mPtr = MWWorld::Ptr();
|
|
|
|
onReferenceUnavailable();
|
|
|
|
}
|
2013-03-31 13:50:48 +00:00
|
|
|
}
|
2012-05-26 23:14:33 +00:00
|
|
|
}
|
|
|
|
}
|