| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ScalarConverter.hpp :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2026/01/03 13:23:10 by bchanot #+# #+# */
- /* Updated: 2026/01/03 15:30:48 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #ifndef SCALARCONVERTER_HPP
- # define SCALARCONVERTER_HPP
- # include <iostream>
- # include <string>
- class ScalarConverter
- {
- public:
- ScalarConverter();
- ScalarConverter( ScalarConverter const & src );
- virtual ~ScalarConverter() = 0;
- ScalarConverter & operator=( ScalarConverter const & rhs );
- static void convert(std::string str);
- private:
- static void _printChar(double converted, bool isPossible);
- static void _printInt(double converted, bool isPossible);
- static void _printFloat(double converted, bool isPossible);
- static void _printDouble(double converted, bool isPossible);
- };
- std::ostream & operator<<( std::ostream & o, ScalarConverter const & i );
- #endif /* ************************************************* SCALARCONVERTER_H */
|