/*
* 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
*/

#pragma once

#include "OE_curve.h"
#include "OE_subcurve.h"
#include <stdint.h>
#include <list>

namespace Pakal { class Archive; }

class OE_joincurve : public OE_curve
{
	public:
		/** Default constructor */
		OE_joincurve();
		OE_joincurve(OE_subcurve* curve1, OE_subcurve* curve2);
		/** Default destructor */
		virtual ~OE_joincurve();

		void persist(Pakal::Archive* archive);

		void addCurve(OE_subcurve* curve, int pos=-1);
		void removeLastCurve();
		void removeCurve(OE_subcurve* curve);
		OE_subcurve* getCurve( int index);

		/** \brief check if the curve is valid. */
		bool check();

		 /** \brief refresh the pts array. */
		virtual void refresh(float dpi, bool force=false);

		void delDependency(OE_base * object);

		virtual void refreshDependency();

		std::list<OE_subcurve*> curves;
};

