summaryrefslogtreecommitdiff
path: root/src/value.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-30 18:06:37 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-30 18:06:37 -0400
commita757b19f51ac7aa120e6829b573187b1ff36301a (patch)
tree5e6d4ef278f3f9915713f958979a4c35a53378fb /src/value.h
parent1b8811f997568d8aede86197a36fc65586996494 (diff)
downloadfork-ledger-a757b19f51ac7aa120e6829b573187b1ff36301a.tar.gz
fork-ledger-a757b19f51ac7aa120e6829b573187b1ff36301a.tar.bz2
fork-ledger-a757b19f51ac7aa120e6829b573187b1ff36301a.zip
Added serialization methods for most type
This allows journal_t objects to be completed serialized to disk and deserialized.
Diffstat (limited to 'src/value.h')
-rw-r--r--src/value.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/value.h b/src/value.h
index 1670be1b..3c5ce286 100644
--- a/src/value.h
+++ b/src/value.h
@@ -227,6 +227,20 @@ private:
data = false;
type = VOID;
}
+
+#if defined(HAVE_BOOST_SERIALIZATION)
+ private:
+ /** Serialization. */
+
+ friend class boost::serialization::access;
+
+ template<class Archive>
+ void serialize(Archive & ar, const unsigned int /* version */) {
+ ar & data;
+ ar & type;
+ ar & refc;
+ }
+#endif // HAVE_BOOST_SERIALIZATION
};
/**
@@ -896,6 +910,20 @@ public:
* Debugging methods.
*/
bool valid() const;
+
+#if defined(HAVE_BOOST_SERIALIZATION)
+private:
+ /** Serialization. */
+
+ friend class boost::serialization::access;
+
+ template<class Archive>
+ void serialize(Archive & ar, const unsigned int /* version */) {
+ ar & true_value;
+ ar & false_value;
+ ar & storage;
+ }
+#endif // HAVE_BOOST_SERIALIZATION
};
#define NULL_VALUE (value_t())