#include "Converters.hpp" #include #include "DecimalData.hpp" #include "IntegerData.hpp" std::shared_ptr DecimalToIntegerConverter:: operator()(std::shared_ptr data) { auto numberData = std::dynamic_pointer_cast(data); if (numberData) { _integer = std::make_shared(numberData->number()); } else { _integer.reset(); } return _integer; } std::shared_ptr IntegerToDecimalConverter:: operator()(std::shared_ptr data) { auto numberData = std::dynamic_pointer_cast(data); if (numberData) { _decimal = std::make_shared(numberData->number()); } else { _decimal.reset(); } return _decimal; }