41 #ifndef PROVENANCE_HPP
42 #define PROVENANCE_HPP 1
47 #include <boost/serialization/access.hpp>
48 #include <boost/serialization/base_object.hpp>
49 #include <boost/serialization/nvp.hpp>
50 #include <boost/serialization/split_member.hpp>
115 return (lhs->m_timestamp.tv_sec == rhs->m_timestamp.tv_sec) ?
116 (lhs->m_timestamp.tv_usec < rhs->m_timestamp.tv_usec) :
117 (lhs->m_timestamp.tv_sec < rhs->m_timestamp.tv_sec);
124 typedef std::set<const Provenance*, Provenance::CompTime>
Set;
209 std::pair<CommandChronicle::ParentVector::const_iterator,
210 CommandChronicle::ParentVector::const_iterator>
278 friend class boost::serialization::access;
280 static unsigned int s_next_serial;
282 mutable Set m_children;
283 struct timeval m_timestamp;
285 unsigned int m_serial;
289 unsigned int m_num_parents;
298 void announceBirth();
300 void announceDeath();
302 void deregisterChild(
const Provenance* child)
const
304 m_children.erase(child);
307 void registerChild(
const Provenance* child)
const
309 m_children.insert(child);
312 template <
class Archive>
313 void load(Archive& ar,
const unsigned int version);
315 template <
class Archive>
316 void save(Archive& ar,
const unsigned int version)
const;
318 template <
class Archive>
319 void serialize(Archive & ar,
const unsigned int version) {
320 boost::serialization::split_member(ar, *
this, version);
328 namespace serialization {
346 template<
class Archive>
348 const unsigned int version)
350 using namespace CXXR;
378 template<
class Archive>
380 const unsigned int version)
382 using namespace CXXR;
393 template <
class Archive>
394 void CXXR::Provenance::load(Archive& ar,
const unsigned int version)
396 ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(
GCNode);
397 ar >> boost::serialization::make_nvp(
"sec", m_timestamp.tv_sec);
398 ar >> boost::serialization::make_nvp(
"usec", m_timestamp.tv_usec);
399 ar >> BOOST_SERIALIZATION_NVP(m_num_parents);
401 ar >> BOOST_SERIALIZATION_NVP(m_xenogenous);
406 template <
class Archive>
407 void CXXR::Provenance::save(Archive& ar,
const unsigned int version)
const
409 ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(
GCNode);
410 ar << boost::serialization::make_nvp(
"sec", m_timestamp.tv_sec);
411 ar << boost::serialization::make_nvp(
"usec", m_timestamp.tv_usec);
412 ar << BOOST_SERIALIZATION_NVP(m_num_parents);
414 ar << BOOST_SERIALIZATION_NVP(m_xenogenous);