Serializer.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* Serializer.hpp :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2026/01/05 13:55:22 by bchanot #+# #+# */
  9. /* Updated: 2026/01/05 19:11:57 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #ifndef SERIALIZER_HPP
  13. # define SERIALIZER_HPP
  14. # include <iostream>
  15. # include <string>
  16. # include "Data.hpp"
  17. class Serializer
  18. {
  19. public:
  20. Serializer( Serializer const & src );
  21. ~Serializer();
  22. Serializer & operator=( Serializer const & rhs );
  23. static uintptr_t serialize(Data* ptr);
  24. static Data* deserialize(uintptr_t raw);
  25. private :
  26. Serializer();
  27. };
  28. std::ostream & operator<<( std::ostream & o, Serializer const & i );
  29. #endif /* ****************************************************** SERIALIZER_H */