/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Serializer.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/09 11:08:07 by adjoly #+# #+# */ /* Updated: 2025/04/09 12:23:14 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ #include "Serializer.hpp" #include 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 } uintptr_t Serializer::serialize(Data *ptr) { return reinterpret_cast(ptr); } Data *Serializer::deserialize(uintptr_t raw) { return reinterpret_cast(raw); } Serializer::Serializer(void) { _log("➕", "Serializer", "", "default constructor called"); } Serializer::Serializer(const Serializer &cpy) { _log("➕", "Serializer", "", "copy constructor called"); if (this != &cpy) *this = cpy; } Serializer::~Serializer(void) { _log("➖", "Serializer", "", "destructor called"); } Serializer &Serializer::operator=(const Serializer &) { return *this; }