Skip to content
OE_base.cpp 1.11 KiB
Newer Older
3dsman's avatar
3dsman committed
* This file is part of project OpenEmbroidery. It's copyrighted by
* the contributors recorded in the version control history of the file.
* Original project location https://code.electrolab.fr/openEmbroidery/openEmbroidery_software
*
* SPDX-License-Identifier: CECILL-2.1
* License-Filename: Licence_CeCILL_V2.1-en.txt
*/
raoul's avatar
raoul committed
#include "Archive.h"
raoul's avatar
raoul committed
OE_base::OE_base() : needRefresh(true)
raoul's avatar
raoul committed
	for (OE_base* dep : dependency)
raoul's avatar
raoul committed
		dep->delDependency(this);
	}
raoul's avatar
raoul committed
void OE_base::persist(Pakal::Archive* archive)
{
	archive->refer("dependency", "object", dependency);
raoul's avatar
raoul committed
}

raoul's avatar
raoul committed
bool OE_base::getNeedRefresh()
{
	return needRefresh;
}

void OE_base::setNeedRefresh()
{
	needRefresh = true;
raoul's avatar
raoul committed
	for (OE_base* dep : dependency)
raoul's avatar
raoul committed
		dep->setNeedRefresh();
raoul's avatar
raoul committed
bool OE_base::ptInBounds(vector_2d pt, float* bounds)
{
	return pt.x >= bounds[0] && pt.x <= bounds[2] && pt.y >= bounds[1] && pt.y <= bounds[3];
}

raoul's avatar
raoul committed
void OE_base::addDependency(OE_base* object)
raoul's avatar
raoul committed
void OE_base::removeDependency(OE_base* object)
raoul's avatar
raoul committed
void OE_base::refreshDependency()
{
}