diff options
author | Richard Maudsley <richard.maudsley@isode.com> | 2014-01-13 16:19:30 (GMT) |
---|---|---|
committer | Richard Maudsley <richard.maudsley@isode.com> | 2014-01-13 16:19:30 (GMT) |
commit | dd2e075c48486824a538229afdfa5871e09c7fda (patch) | |
tree | 212ef5f6412b67839910ea02a7f8dfe3badf6dc4 /Swift/Controllers/HighlightAction.h | |
parent | f554c290a644043a2180784308a105d8f7ea8fdf (diff) | |
download | swift-dd2e075c48486824a538229afdfa5871e09c7fda.zip swift-dd2e075c48486824a538229afdfa5871e09c7fda.tar.bz2 |
Replaced HighlightManager save-data with boost::serialization.
Change-Id: Ia4e2baa52ba765f2bfd4a1986d63c0ba2c3acd09
Diffstat (limited to 'Swift/Controllers/HighlightAction.h')
-rw-r--r-- | Swift/Controllers/HighlightAction.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Swift/Controllers/HighlightAction.h b/Swift/Controllers/HighlightAction.h index bfbed74..a8da90a 100644 --- a/Swift/Controllers/HighlightAction.h +++ b/Swift/Controllers/HighlightAction.h @@ -8,6 +8,9 @@ #include <string> +#include <boost/archive/text_oarchive.hpp> +#include <boost/archive/text_iarchive.hpp> + namespace Swift { class HighlightRule; @@ -34,6 +37,9 @@ namespace Swift { bool isEmpty() const { return !highlightText_ && !playSound_; } private: + friend class boost::serialization::access; + template<class Archive> void serialize(Archive & ar, const unsigned int version); + bool highlightText_; std::string textColor_; std::string textBackground_; @@ -42,4 +48,14 @@ namespace Swift { std::string soundFile_; }; + template<class Archive> + void HighlightAction::serialize(Archive& ar, const unsigned int /*version*/) + { + ar & highlightText_; + ar & textColor_; + ar & textBackground_; + ar & playSound_; + ar & soundFile_; + } + } |