15 #ifndef SERIALBOX_CORE_FRONTEND_GRIDTOOLS_SAVEPOINT_H 16 #define SERIALBOX_CORE_FRONTEND_GRIDTOOLS_SAVEPOINT_H 109 explicit savepoint(
const std::shared_ptr<SavepointImpl>& savepoint_impl) {
110 savepointImpl_ = savepoint_impl;
120 template <
class StringType,
class ValueType>
122 savepointImpl_->addMetainfo(std::forward<StringType>(key), std::forward<ValueType>(value));
127 return (*savepointImpl_ == *right.savepointImpl_);
134 void swap(
savepoint& other) noexcept { savepointImpl_->swap(*other.savepointImpl_); }
137 const std::string&
name() const noexcept {
return savepointImpl_->name(); }
144 bool empty() const noexcept {
return savepointImpl_->empty(); }
147 std::string
to_string()
const {
return savepointImpl_->toString(); };
151 return (stream << *s.savepointImpl_);
155 const std::shared_ptr<SavepointImpl>&
impl()
const {
return savepointImpl_; }
158 std::shared_ptr<SavepointImpl> savepointImpl_;
Namespace of the serialbox library.
Shared implementation of the Savepoint.