50 #include <boost/serialization/access.hpp>
51 #include <boost/serialization/base_object.hpp>
52 #include <boost/serialization/nvp.hpp>
96 m_valgen(valgen), m_environment(env), m_under_evaluation(false),
108 return m_environment;
190 friend class boost::serialization::access;
195 mutable bool m_under_evaluation;
196 mutable bool m_interrupted;
208 template <
class Archive>
209 void serialize(Archive& ar,
const unsigned int version)
211 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
RObject);
227 object = static_cast<Promise*>(
object)->force();
235 namespace serialization {
253 template<
class Archive>
255 const unsigned int version)
257 using namespace CXXR;
285 template<
class Archive>
286 void save_construct_data(Archive& ar,
const CXXR::Promise* t,
287 const unsigned int version)
289 using namespace CXXR;
322 using namespace CXXR;
323 const Promise& prom = *SEXP_downcast<Promise*>(x);
324 return const_cast<RObject*
>(prom.valueGenerator());
341 using namespace CXXR;
342 const Promise& prom = *SEXP_downcast<Promise*>(x);
359 using namespace CXXR;
360 Promise& prom = *SEXP_downcast<Promise*>(x);
384 #define PREXPR(e) R_PromiseExpr(e)
386 #define PREXPR(e) PRCODE(e)