You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Kernel/FITKCore/FITKAbstractObjectContainer...

62 lines
1.6 KiB
C++

#include "FITKAbstractObjectContainer.hpp"
#include "FITKAbstractDataObject.h"
namespace Core
{
/**
* FITKAbstractObjectContainerPrivate
* _objectFITKAbstractObjectPrivate_containers
* @param absObj FITKAbstractObjectPrivate
*/
FITKAbstractObjectContainerPrivate::FITKAbstractObjectContainerPrivate(FITKAbstractObjectPrivate* absObj)
:_object(absObj)
{
if (absObj == nullptr) return;
absObj->_containers.append(this);
}
FITKAbstractObjectContainerPrivate::FITKAbstractObjectContainerPrivate()
{
}
/**
* FITKAbstractObjectContainerPrivate
* FITKAbstractObjectPrivate_containers
*/
FITKAbstractObjectContainerPrivate::~FITKAbstractObjectContainerPrivate()
{
if (_object == nullptr) return;
_object->_containers.removeOne(this);
}
/**
* FITKAbstractObjectPrivate
* @return FITKAbstractObjectPrivatenullptr
*/
Core::FITKAbstractObjectPrivate* FITKAbstractObjectContainerPrivate::getObject()
{
return _object;
}
void FITKAbstractObjectContainerPrivate::setObj(FITKAbstractObjectPrivate* absObj)
{
if(_object != nullptr)
_object->_containers.removeOne(this);
_object = absObj;
if (absObj == nullptr) return;
absObj->_containers.append(this);
}
/**
* _objectnullptr
* FITKAbstractObjectPrivate
*/
void FITKAbstractObjectContainerPrivate::ObjectDestoried()
{
_object = nullptr;
}
}