From: Diane Trout Date: Tue, 24 Nov 2009 17:12:51 +0000 (-0800) Subject: Remove prototype boost serialiation code. X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=commitdiff_plain;h=d058d097a3015f3ba861d494b68c8cb6f003f6d6 Remove prototype boost serialiation code. I was having the hardest time updating it for boost 1.41 and, as its not actually being used in any way I removed the stubs from the classes and commented out the test code. --- diff --git a/alg/color.hpp b/alg/color.hpp index 0c4f3c7..cc11997 100644 --- a/alg/color.hpp +++ b/alg/color.hpp @@ -3,10 +3,6 @@ #include -#include -#include -#include - #include class Color; @@ -42,16 +38,6 @@ public: protected: float colors[4]; -private: - friend class boost::serialization::access; - template - void serialize(Archive& ar, const unsigned int /*version*/) { - ar & boost::serialization::make_nvp("red", colors[RedChannel]); - ar & boost::serialization::make_nvp("green", colors[GreenChannel]); - ar & boost::serialization::make_nvp("blue", colors[BlueChannel]); - ar & boost::serialization::make_nvp("alpha", colors[AlphaChannel]); - } }; -BOOST_CLASS_EXPORT(Color) #endif diff --git a/alg/sequence.hpp b/alg/sequence.hpp index f7d3c36..706f499 100644 --- a/alg/sequence.hpp +++ b/alg/sequence.hpp @@ -17,16 +17,6 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include #include @@ -69,7 +59,6 @@ private: ar & BOOST_SERIALIZATION_NVP(sequence); } }; -BOOST_CLASS_EXPORT(motif); class Sequence; typedef boost::shared_ptr SequenceRef; @@ -256,18 +245,6 @@ protected: //! look for a string sequence type and and it to an annotation list void add_string_annotation(std::string a_seq, std::string name); - // boost::serialization support - friend class boost::serialization::access; - template - void serialize(Archive& ar, const unsigned int /*version*/) { - ar & BOOST_SERIALIZATION_NVP(seq); - ar & BOOST_SERIALIZATION_NVP(header); - ar & BOOST_SERIALIZATION_NVP(species); - ar & BOOST_SERIALIZATION_NVP(annotation_list); - ar & BOOST_SERIALIZATION_NVP(motif_list); - } }; -//BOOST_CLASS_EXPORT(Sequence); -//BOOST_CLASS_EXPORT_GUID(Sequence, "Sequence") #endif diff --git a/alg/test/test_color.cpp b/alg/test/test_color.cpp index c268787..351a54a 100644 --- a/alg/test/test_color.cpp +++ b/alg/test/test_color.cpp @@ -49,6 +49,7 @@ BOOST_AUTO_TEST_CASE ( color ) BOOST_CHECK_CLOSE (colors[Color::AlphaChannel ], dotfour, tolerance ); } +/* BOOST_AUTO_TEST_CASE( serialize_color ) { const Color color1(1.0, 1.0, 1.0, 1.0); @@ -87,3 +88,4 @@ BOOST_AUTO_TEST_CASE( serialize_xml_color ) } BOOST_CHECK_EQUAL(color1, color2); } +*/ diff --git a/alg/test/test_sequence.cpp b/alg/test/test_sequence.cpp index 2ea2fc0..ae03cdb 100644 --- a/alg/test/test_sequence.cpp +++ b/alg/test/test_sequence.cpp @@ -967,7 +967,7 @@ BOOST_AUTO_TEST_CASE( get_name ) seq.set_fasta_header("fasta human"); BOOST_CHECK_EQUAL( seq.get_name(), "fasta human"); } - +/* BOOST_AUTO_TEST_CASE( serialize_simple ) { std::string seq_string = "AAGGCCTT"; @@ -1075,3 +1075,4 @@ BOOST_AUTO_TEST_CASE( serialize_xml_two ) // test if our pointers are the same BOOST_CHECK_EQUAL(seq1_loaded.data(), seq2_loaded.data()); } +*/