6 #include <boost/python/class.hpp>
7 #include <boost/python/module.hpp>
8 #include <boost/python/init.hpp>
9 #include <boost/python/def.hpp>
14 #include "boost/archive/xml_oarchive.hpp"
23 std::unique_ptr< T > payload;
24 std::stringbuf sdataBuf;
25 sdataBuf.pubsetbuf( const_cast<char *> ( payloadData.c_str() ), payloadData.size() );
27 std::istream inBuffer( &sdataBuf );
28 eos::portable_iarchive ia( inBuffer );
29 payload.reset(
new T );
34 std::ostringstream outBuffer;
35 boost::archive::xml_oarchive xmlResult( outBuffer );
36 xmlResult << boost::serialization::make_nvp(
"cmsCondPayload", *payload );
38 return outBuffer.str();
std::string convertToXML(const std::string &payloadData, const std::string &payloadType)