Text-Adventure/Serializable.cpp

16 lines
258 B
C++
Raw Permalink Normal View History

2023-11-16 00:44:12 +08:00
//
// Created by tqcq on 2023/11/14.
//
#include "Serializable.h"
void Serializable::serialize(std::ostream &os) const {
os << ToString();
}
void Serializable::deserialize(std::istream &is) {
std::string str;
is >> str;
FromString(str);
}