From 5e527213a2430bb3018e5eebd909aef294edf9b5 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Dec 2020 18:48:46 +0300 Subject: Switch to build2 --- examples/cxx/tree/binary/boost/driver.cxx | 72 ------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 examples/cxx/tree/binary/boost/driver.cxx (limited to 'examples/cxx/tree/binary/boost/driver.cxx') diff --git a/examples/cxx/tree/binary/boost/driver.cxx b/examples/cxx/tree/binary/boost/driver.cxx deleted file mode 100644 index df053b6..0000000 --- a/examples/cxx/tree/binary/boost/driver.cxx +++ /dev/null @@ -1,72 +0,0 @@ -// file : examples/cxx/tree/binary/boost/driver.cxx -// copyright : not copyrighted - public domain - -#include // std::auto_ptr -#include // std::memcpy -#include -#include - -// You can generate insertion/extraction code for other archive -// types (for example, binary, XML, etc). -// -#include -#include - -#include "library.hxx" - -using std::cerr; -using std::endl; - -int -main (int argc, char* argv[]) -{ - if (argc != 2) - { - cerr << "usage: " << argv[0] << " library.xml" << endl; - return 1; - } - - try - { - using namespace library; - using boost::archive::text_oarchive; - using boost::archive::text_iarchive; - - // Read in the file. - // - std::auto_ptr c (catalog_ (argv[1])); - - cerr << *c << endl; - - // Save into a text archive. - // - std::ostringstream ostr; - text_oarchive oa (ostr); - xml_schema::ostream os (oa); - - os << *c; - - // Print the text representation. - // - std::string str (ostr.str ()); - - cerr << endl - << "text representation: " << endl - << str << endl; - - // Load from a text archive. - // - std::istringstream istr (str); - text_iarchive ia (istr); - xml_schema::istream is (ia); - - std::auto_ptr copy (new catalog (is)); - - cerr << *copy << endl; - } - catch (const xml_schema::exception& e) - { - cerr << e << endl; - return 1; - } -} -- cgit v1.1