diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-13 05:31:24 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-13 05:31:39 -0400 |
commit | 2dec00a882a72b4f031d23c641889a216785c345 (patch) | |
tree | c1a281c54e96e48b0c70b709d36680612e169c0e /src/scope.h | |
parent | 7146926fd50c1c599a05d92451c3ce593795f14c (diff) | |
download | fork-ledger-2dec00a882a72b4f031d23c641889a216785c345.tar.gz fork-ledger-2dec00a882a72b4f031d23c641889a216785c345.tar.bz2 fork-ledger-2dec00a882a72b4f031d23c641889a216785c345.zip |
Fixes to scope.h for the sake of Boost.Serialization
Diffstat (limited to 'src/scope.h')
-rw-r--r-- | src/scope.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/scope.h b/src/scope.h index f9bea6b6..98b0ee02 100644 --- a/src/scope.h +++ b/src/scope.h @@ -305,6 +305,24 @@ public: virtual bool type_required() const { return required; } + +#if defined(HAVE_BOOST_SERIALIZATION) +protected: + explicit context_scope_t() { + TRACE_CTOR(context_scope_t, ""); + } + + /** Serialization. */ + + friend class boost::serialization::access; + + template<class Archive> + void serialize(Archive& ar, const unsigned int /* version */) { + ar & boost::serialization::base_object<child_scope_t>(*this); + ar & value_type_context; + ar & required; + } +#endif // HAVE_BOOST_SERIALIZATION }; class call_scope_t : public context_scope_t @@ -398,7 +416,7 @@ public: } #if defined(HAVE_BOOST_SERIALIZATION) -private: +protected: explicit call_scope_t() { TRACE_CTOR(call_scope_t, ""); } @@ -409,8 +427,9 @@ private: template<class Archive> void serialize(Archive& ar, const unsigned int /* version */) { - ar & boost::serialization::base_object<child_scope_t>(*this); + ar & boost::serialization::base_object<context_scope_t>(*this); ar & args; + //ar & ptr; } #endif // HAVE_BOOST_SERIALIZATION }; |