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