portable_binary_archive.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. // (C) Copyright 2002-4 Robert Ramey - http://www.rrsd.com .
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org for updates, documentation, and revision history.
  6. // file includes for testing a custom archive.
  7. // as an example this tests the portable binary archive
  8. #include <fstream>
  9. // #include output archive header
  10. #include "../example/portable_binary_oarchive.hpp"
  11. // define output archive class to be used
  12. typedef portable_binary_oarchive test_oarchive;
  13. // and corresponding stream
  14. typedef std::ofstream test_ostream;
  15. // repeat the above for correspondng input archive
  16. #include "../example/portable_binary_iarchive.hpp"
  17. typedef portable_binary_iarchive test_iarchive;
  18. typedef std::ifstream test_istream;
  19. // since this archive class isn't compiled into the
  20. // boost serialization library, include this here
  21. // so that things get instantiated
  22. #include "../example/portable_binary_oarchive.cpp"
  23. #include "../example/portable_binary_iarchive.cpp"
  24. // and stream open flags
  25. #define TEST_STREAM_FLAGS std::ios::binary