diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-30 18:06:37 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-30 18:06:37 -0400 |
commit | a757b19f51ac7aa120e6829b573187b1ff36301a (patch) | |
tree | 5e6d4ef278f3f9915713f958979a4c35a53378fb /src/flags.h | |
parent | 1b8811f997568d8aede86197a36fc65586996494 (diff) | |
download | fork-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/flags.h')
-rw-r--r-- | src/flags.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/flags.h b/src/flags.h index 21607fc2..33935556 100644 --- a/src/flags.h +++ b/src/flags.h @@ -99,6 +99,17 @@ public: void drop_flags(const flags_t arg) { _flags = static_cast<T>(static_cast<U>(_flags) & static_cast<U>(~arg)); } + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + friend class boost::serialization::access; + + template<class Archive> + void serialize(Archive & ar, const unsigned int /* version */) + { + ar & _flags; + } +#endif // HAVE_BOOST_SERIALIZATION }; /** @@ -201,6 +212,17 @@ public: void drop_flags(const flags_t arg) { _flags.drop_flags(arg); } + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + friend class boost::serialization::access; + + template<class Archive> + void serialize(Archive & ar, const unsigned int /* version */) + { + ar & _flags; + } +#endif // HAVE_BOOST_SERIALIZATION }; #endif // _FLAGS_H |