| 1 | #include <iostream>
|
|---|
| 2 |
|
|---|
| 3 | using namespace std;
|
|---|
| 4 |
|
|---|
| 5 | #include <boost/archive/text_iarchive.hpp>
|
|---|
| 6 | #include <boost/archive/text_oarchive.hpp>
|
|---|
| 7 | #include <boost/serialization/export.hpp>
|
|---|
| 8 |
|
|---|
| 9 | #include "b.h"
|
|---|
| 10 |
|
|---|
| 11 | class __declspec(dllexport) D : public B {
|
|---|
| 12 |
|
|---|
| 13 | public:
|
|---|
| 14 |
|
|---|
| 15 | D() {};
|
|---|
| 16 |
|
|---|
| 17 | D(std::string a): B() { m_string = a; cout << "Done D" << endl; };
|
|---|
| 18 |
|
|---|
| 19 | virtual ~D() {};
|
|---|
| 20 |
|
|---|
| 21 | virtual void aB() { cout << "A B" << endl; }
|
|---|
| 22 |
|
|---|
| 23 | std::string m_string;
|
|---|
| 24 |
|
|---|
| 25 | template<class Archive> void serialize(Archive &ar, const unsigned int version)
|
|---|
| 26 | {
|
|---|
| 27 | ar & boost::serialization::base_object<B>(*this);
|
|---|
| 28 | ar & m_string;
|
|---|
| 29 | }
|
|---|
| 30 | };
|
|---|
| 31 | BOOST_CLASS_EXPORT(D);
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 | static D bla("Mr C");
|
|---|