16 lines
258 B
C++
16 lines
258 B
C++
//
|
|
// 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);
|
|
}
|