|
Boost : |
From: Mikhail Kubzin (mikhail.kubzin_at_[hidden])
Date: 2005-12-21 05:01:41
I have got one more question. If I were to use class A in some .cpp file,
where I am not interested in serialization, do I still need to include
serialization/archive/.. headers in that .cpp? Is it posssible to avoid
that?
-----------------------------------------------------------------------
A.h
#include <boost/serialization/version.hpp>
#include <boost/serialization/export.hpp>
namespace boost {
namespace serialization {
class access;
}
}
class A
{
};
BOOST_CLASS_VERSION(A, 1)
BOOST_CLASS_EXPORT(A)
-----------------------------------------------------------------------
A.cpp
#include <boost/archive/polymorphic_archive.hpp>
#include "A.h"
<<implementation>
-----------------------------------------------------------------------
B.cpp
<<<<===== #include <boost/archive/polymorphic_archive.hpp>????
#include "A.h"
void B::foo()
{
A a;
a.DoSomething();
}
------------------------------------------------------------------------
Thank you very much in advance!
Mikhail
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk