28 #include "boost/iostreams/positioning.hpp"
33 using namespace pwiz::util;
35 using namespace pwiz::tradata;
43 if (
os_) *
os_ <<
"testWriteRead()" << endl;
51 tramlSerializer.
write(oss, td);
53 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
55 shared_ptr<istringstream> iss(
new istringstream(oss.str()));
57 tramlSerializer.
read(iss, td2);
60 if (
os_ && diff) *
os_ << diff << endl;
65 int main(
int argc,
char* argv[])
71 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
PWIZ_API_DECL const CV & cv(const std::string &prefix)
returns a CV object for the specified namespace (prefix); currently supported namespaces are: MS UO ...
TraData <-> traML stream serialization.
void read(boost::shared_ptr< std::istream > is, TraData &td) const
read in TraData object from a traML istream
void testWriteRead(const MSData &msd)
Calculate diffs of objects in a ProteoWizard data model hierarchy.
void diff(const string &filename1, const string &filename2)
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
#define TEST_PROLOG(argc, argv)
void write(std::ostream &os, const TraData &td) const
write TraData object to ostream as traML