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

BoostSerializationHeaders deleted

parent 1ad11ba8
Loading
Loading
Loading
Loading

src/BoostSerializationHeaders.h

deleted100644 → 0
+0 −74
Original line number Diff line number Diff line
#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
+0 −8
Original line number Diff line number Diff line
@@ -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++)
+0 −1
Original line number Diff line number Diff line
@@ -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"

+0 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
#define GEOMETRY_EX_H

#include "Vector.h"
#include "BoostSerializationHeaders.h"

#ifndef USE_MS_GEOMETRY

+0 −9
Original line number Diff line number Diff line
@@ -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; }
Loading