28#include <ql/time/daycounter.hpp>
30#include <boost/archive/binary_iarchive.hpp>
31#include <boost/archive/binary_oarchive.hpp>
34namespace serialization {
39template <
class Archive>
void serialize(Archive& ar, QuantLib::DayCounter& dc,
const unsigned int) {
42 if (Archive::is_saving::value) {
43 dcName = dc.empty() ?
"" : dc.name();
47 if (!dcName.empty()) {
50 }
catch (
const std::exception& e) {
51 QL_FAIL(
"could not deserialize day counter, please extend parseDayCounter(): " << e.what());
void serialize(Archive &ar, QuantLib::Date &d, const unsigned int)
Allow for serialization of QuantLib::Date without amending its class (non-intrusive)
DayCounter parseDayCounter(const string &s)
Convert text to QuantLib::DayCounter.
Map text representations to QuantLib/QuantExt types.