Commit 493f3cb4 authored by Alvarez, Gonzalo's avatar Alvarez, Gonzalo
Browse files

BoostSerializationHeaders deleted

parent 1ad11ba8
#ifndef PSI_BOOST_SER_H_H
#define PSI_BOOST_SER_H_H
#include <exception>
#ifdef USE_BOOST
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/utility.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/split_free.hpp>
#else
#include <string>
#include <stdexcept>
namespace boost {
inline void noboost(std::string msg)
{
std::string str("ERROR: Please compile with -DUSE_BOOST for ");
str += msg + " to work\n";
throw std::runtime_error(str);
}
namespace serialization {
template<typename T>
class base_object {
};
} // namespace serialization
namespace archive {
class text_iarchive {
public:
text_iarchive(std::ifstream&)
{
boost::noboost("text_oarchive");
}
};
template<typename T>
text_iarchive& operator>>(text_iarchive& ia, const T&)
{
boost::noboost("operator>> text_iarchive");
return ia;
}
class text_oarchive {
public:
text_oarchive(std::ofstream&)
{
boost::noboost("text_oarchive");
}
};
template<typename T>
text_oarchive& operator<<(text_oarchive& oa, const T&)
{
boost::noboost("operator<< text_oarchive");
return oa;
}
} // namespace archive
} // namespace boost
#endif
#endif
......@@ -80,7 +80,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#include "GeometryTerm.h"
#include "GeometryEx.h"
#include "BoostSerializationHeaders.h"
#include "Io/IoSerializerStub.h"
namespace PsimagLite {
......@@ -127,13 +126,6 @@ public:
}
}
Geometry(String filename)
{
std::ifstream ifs(filename.c_str());
boost::archive::text_iarchive ia(ifs);
ia >> (*this);
}
~Geometry()
{
for (SizeType i=0;i<terms_.size();i++)
......
......@@ -78,7 +78,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#ifndef GEOMETRY_DIR_H
#define GEOMETRY_DIR_H
#include <cassert>
#include "BoostSerializationHeaders.h"
#include "Io/IoSerializerStub.h"
#include "Matrix.h"
......
......@@ -2,7 +2,6 @@
#define GEOMETRY_EX_H
#include "Vector.h"
#include "BoostSerializationHeaders.h"
#ifndef USE_MS_GEOMETRY
......
......@@ -125,15 +125,6 @@ public:
throw RuntimeError("Ladder: leg must divide number of sites\n");
}
template<class Archive>
void write(Archive & ar, const unsigned int)
{
ar & boost::serialization::base_object<GeometryBase<ComplexOrRealType,InputType> >(*this);
ar & linSize_;
ar & leg_;
ar & isPeriodicY_;
}
virtual SizeType maxConnections() const { return (isPeriodicX_) ? linSize_ : leg_ + 1; }
virtual SizeType dirs() const { return 2; }
......
......@@ -111,16 +111,6 @@ public:
if (ladder_) delete ladder_;
}
template<class Archive>
void write(Archive & ar, const unsigned int)
{
ar & boost::serialization::base_object<GeometryBase<ComplexOrRealType, InputType> >(*this);
ar & linSize_;
ar & bathSitesPerSite_;
ar & clusterSize_;
ar & ladder_;
}
virtual SizeType dirs() const { return 3; }
virtual SizeType length(SizeType) const
......
......@@ -96,13 +96,6 @@ public:
: linSize_(linSize)
{}
template<class Archive>
void write(Archive & ar, const unsigned int)
{
ar & boost::serialization::base_object<GeometryBase<ComplexOrRealType, InputType> >(*this);
ar & linSize_;
}
virtual SizeType maxConnections() const
{
return linSize_ - 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment