「🏗️」 wip: work in progress, not done yet.
This commit is contained in:
47
ex00/ScalarConverter.cpp
Normal file
47
ex00/ScalarConverter.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ScalarConverter.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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) {
|
||||
|
||||
}
|
27
ex00/ScalarConverter.hpp
Normal file
27
ex00/ScalarConverter.hpp
Normal file
@ -0,0 +1,27 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ScalarConverter.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/04/03 19:38:39 by adjoly #+# #+# */
|
||||
/* Updated: 2025/04/04 12:12:41 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
class ScalarConverter {
|
||||
public:
|
||||
static void convert(std::string &);
|
||||
private:
|
||||
ScalarConverter(void);
|
||||
ScalarConverter(const ScalarConverter &);
|
||||
~ScalarConverter(void);
|
||||
|
||||
ScalarConverter &operator=(const ScalarConverter &);
|
||||
};
|
@ -0,0 +1,17 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* main.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* 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) {
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user