#include "FormingTool.h"
#include "Deserializer.h"
#include "Serializer.h"
#include <iostream>
#include <ostream>

FormingTool::FormingTool(const std::string &toolType, double toolSize, const std::string &materialType)
	: m_toolType(toolType), m_toolSize(toolSize), m_materialType(materialType), m_toolRadius(0.0) // Assuming default value for radius
{
}

double FormingTool::getToolRadius() const
{
	return m_toolRadius;
}

double FormingTool::getToolSize() const
{
	return m_toolSize;
}

std::string FormingTool::getToolType() const
{
	return m_toolType;
}

std::string FormingTool::getMaterialType() const
{
	return m_materialType;
}

void FormingTool::setToolRadius(double radius)
{
	m_toolRadius = radius;
}

void FormingTool::setToolSize(double toolSize)
{
    m_toolSize = toolSize;
}

void FormingTool::setToolType(const std::string &toolType)
{
    m_toolType = toolType;
}

void FormingTool::setMaterialType(const std::string &materialType)
{
	m_materialType = materialType;
}

void FormingTool::useTool()
{
    std::cout << "Using " << m_toolType << " of size " << m_toolSize << std::endl;
}

void FormingTool::serialize(std::ofstream &ofs) const
{
	ofs << m_toolType << " " << m_toolSize << std::endl;
}

void FormingTool::deserialize(std::ifstream &ifs)
{
	ifs >> m_toolType >> m_toolSize;
}
