23 metaInfo_ = std::make_shared<MetainfoMapImpl>(*other.metaInfo_);
29 jsonNode[
"name"] = name_;
30 jsonNode[
"meta_info"] = metaInfo_->toJSON();
36 metaInfo_ = std::make_shared<MetainfoMapImpl>();
41 if(jsonNode.is_null() || jsonNode.empty())
44 if(!jsonNode.count(
"name"))
46 name_ = jsonNode[
"name"];
48 if(jsonNode.count(
"meta_info"))
49 metaInfo_->fromJSON(jsonNode[
"meta_info"]);
59 return (stream << s.name_ <<
" " << (*s.metaInfo_));
json::json toJSON() const
Convert to JSON.
void fromJSON(const json::json &jsonNode)
Construct from JSON node.
std::string toString() const
Convert savepoint to string.
Namespace of the serialbox library.
SavepointImpl & operator=(const SavepointImpl &other)
Copy assignment.
Exception class which stores a human-readable error description.
Shared implementation of the Savepoint.
friend std::ostream & operator<<(std::ostream &stream, const SavepointImpl &s)
Convert to stream.