Serializer.hpp
1 /* ************************************************************************** */ 2 /* */ 3 /* ::: :::::::: */ 4 /* Serializer.hpp :+: :+: :+: */ 5 /* +:+ +:+ +:+ */ 6 /* By: gychoi <gychoi@student.42seoul.kr> +#+ +:+ +#+ */ 7 /* +#+#+#+#+#+ +#+ */ 8 /* Created: 2023/12/17 22:26:03 by gychoi #+# #+# */ 9 /* Updated: 2023/12/18 02:51:02 by gychoi ### ########.fr */ 10 /* */ 11 /* ************************************************************************** */ 12 13 #pragma once 14 #ifndef __SERIALIZER_HPP__ 15 #define __SERIALIZER_HPP__ 16 17 #include <stdint.h> 18 #include <iostream> 19 20 struct Data 21 { 22 std::string data; 23 }; 24 25 class Serializer 26 { 27 private: 28 Serializer(); 29 Serializer(Serializer const& target); 30 Serializer& operator=(Serializer const& target); 31 ~Serializer(); 32 33 public: 34 static uintptr_t serialize(Data* ptr); 35 static Data* deserialize(uintptr_t raw); 36 }; 37 38 #endif /* __SERIALIZER_HPP__ */