summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0c1c957)
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.
#include <boost/shared_ptr.hpp>
#include <boost/shared_ptr.hpp>
-#include <boost/serialization/export.hpp>
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/version.hpp>
-
#include <ostream>
class Color;
#include <ostream>
class Color;
protected:
float colors[4];
protected:
float colors[4];
-private:
- friend class boost::serialization::access;
- template<class Archive>
- 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)
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/fstream.hpp>
-#include <boost/serialization/base_object.hpp>
-#include <boost/serialization/export.hpp>
-#include <boost/serialization/list.hpp>
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/string.hpp>
-#include <boost/serialization/shared_ptr.hpp>
-#include <boost/serialization/utility.hpp>
-#include <boost/serialization/version.hpp>
-#include <boost/serialization/vector.hpp>
-
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
ar & BOOST_SERIALIZATION_NVP(sequence);
}
};
ar & BOOST_SERIALIZATION_NVP(sequence);
}
};
-BOOST_CLASS_EXPORT(motif);
class Sequence;
typedef boost::shared_ptr<Sequence> SequenceRef;
class Sequence;
typedef boost::shared_ptr<Sequence> SequenceRef;
//! look for a string sequence type and and it to an annotation list
void add_string_annotation(std::string a_seq, std::string name);
//! 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<class Archive>
- 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")
BOOST_CHECK_CLOSE (colors[Color::AlphaChannel ], dotfour, tolerance );
}
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);
BOOST_AUTO_TEST_CASE( serialize_color )
{
const Color color1(1.0, 1.0, 1.0, 1.0);
}
BOOST_CHECK_EQUAL(color1, color2);
}
}
BOOST_CHECK_EQUAL(color1, color2);
}
seq.set_fasta_header("fasta human");
BOOST_CHECK_EQUAL( seq.get_name(), "fasta human");
}
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";
BOOST_AUTO_TEST_CASE( serialize_simple )
{
std::string seq_string = "AAGGCCTT";
// test if our pointers are the same
BOOST_CHECK_EQUAL(seq1_loaded.data(), seq2_loaded.data());
}
// test if our pointers are the same
BOOST_CHECK_EQUAL(seq1_loaded.data(), seq2_loaded.data());
}