/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ScalarConverter.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/03 19:38:39 by adjoly #+# #+# */ /* Updated: 2025/04/08 14:29:28 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ #pragma once #include #include class ScalarConverter { public: static void convert(std::string &); private: ScalarConverter(void); ScalarConverter(const ScalarConverter &); ~ScalarConverter(void); ScalarConverter &operator=(const ScalarConverter &); template void _printFloat(T nb) { std::cout << "float: " << static_cast(nb) << "f" << std::endl; } template void _printInt(T nb) { std::cout << "int: " << static_cast(nb) << std::endl; } template void _printChar(T nb) { std::cout << "char: '" << static_cast(nb) << "'" << std::endl; } template void _printDouble(T nb) { std::cout << "double: " << static_cast(nb) << std::endl; } };