diff --git a/ex00/ScalarConverter.cpp b/ex00/ScalarConverter.cpp new file mode 100644 index 0000000..2649616 --- /dev/null +++ b/ex00/ScalarConverter.cpp @@ -0,0 +1,47 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ScalarConverter.cpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: adjoly +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/04/03 19:59:17 by adjoly #+# #+# */ +/* Updated: 2025/04/04 11:20:32 by adjoly ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "ScalarConverter.hpp" + +void _log(std::string emoji, std::string what, std::string who, + std::string str) { +#ifdef VERBOSE + if (who.empty()) + std::cout << "「" << emoji << "」" << what << ": " << str << std::endl; + else + std::cout << "「" << emoji << "」" << what << "(" << who << "): " << str + << std::endl; +#else + (void)emoji, (void)what, (void)who, (void)str; +#endif +} + + +ScalarConverter::ScalarConverter(void) { + _log("➕", "ScalarConverter", "", "default constructor called"); +} + +ScalarConverter::ScalarConverter(const ScalarConverter &cpy) { + _log("➕", "ScalarConverter", "", "copy constructor called"); + if (this != &cpy) { + *this = cpy; + } +} + +ScalarConverter::~ScalarConverter(void) { + _log("➖", "ScalarConverter", "", "destructor called"); + +} + +void ScalarConverter::convert(std::string &s) { + +} diff --git a/ex00/ScalarConverter.hpp b/ex00/ScalarConverter.hpp new file mode 100644 index 0000000..0759db6 --- /dev/null +++ b/ex00/ScalarConverter.hpp @@ -0,0 +1,27 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ScalarConverter.hpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: adjoly +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/04/03 19:38:39 by adjoly #+# #+# */ +/* Updated: 2025/04/04 12:12:41 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 &); +}; diff --git a/ex00/main.cpp b/ex00/main.cpp index e69de29..dcdb068 100644 --- a/ex00/main.cpp +++ b/ex00/main.cpp @@ -0,0 +1,17 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* main.cpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: adjoly +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/04/03 19:38:09 by adjoly #+# #+# */ +/* Updated: 2025/04/03 19:51:28 by adjoly ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "ScalarConverter.hpp" + +int main(void) { + +}