35 lines
974 B
C++
35 lines
974 B
C++
#ifndef SCALARCONVERTER_HPP
|
|
#define SCALARCONVERTER_HPP
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <limits>
|
|
#include <iomanip>
|
|
#include <cstdlib>
|
|
|
|
class ScalarConverter
|
|
{
|
|
private:
|
|
ScalarConverter(void);
|
|
ScalarConverter(ScalarConverter const &src);
|
|
~ScalarConverter(void);
|
|
ScalarConverter& operator=(ScalarConverter const &rhs);
|
|
|
|
public:
|
|
static void convert(const std::string& input);
|
|
|
|
static bool isChar(const std::string& input);
|
|
static bool isInt(const std::string& input);
|
|
static bool isFloat(const std::string& input);
|
|
static bool isDouble(const std::string& input);
|
|
static bool isOther(const std::string &input);
|
|
|
|
static void toChar(const std::string &input);
|
|
static void toOther(const std::string &input);
|
|
static void toInt(const std::string &input);
|
|
static void toFloat(const std::string &input);
|
|
static void toDouble(const std::string &input);
|
|
|
|
};
|
|
|
|
#endif |