From 2dec00a882a72b4f031d23c641889a216785c345 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 13 Jun 2010 05:31:24 -0400 Subject: Fixes to scope.h for the sake of Boost.Serialization --- src/scope.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/scope.h') 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 + void serialize(Archive& ar, const unsigned int /* version */) { + ar & boost::serialization::base_object(*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 void serialize(Archive& ar, const unsigned int /* version */) { - ar & boost::serialization::base_object(*this); + ar & boost::serialization::base_object(*this); ar & args; + //ar & ptr; } #endif // HAVE_BOOST_SERIALIZATION }; -- cgit v1.2.3