binary_wiarchive.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP
  2. #define BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER)
  5. # pragma once
  6. #endif
  7. /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
  8. // binary_wiarchive.hpp
  9. // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
  10. // Use, modification and distribution is subject to the Boost Software
  11. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  12. // http://www.boost.org/LICENSE_1_0.txt)
  13. // See http://www.boost.org for updates, documentation, and revision history.
  14. #include <boost/config.hpp>
  15. #ifdef BOOST_NO_STD_WSTREAMBUF
  16. #error "wide char i/o not supported on this platform"
  17. #else
  18. #include <istream> // wistream
  19. #include <boost/archive/binary_iarchive_impl.hpp>
  20. #include <boost/archive/detail/register_archive.hpp>
  21. namespace boost {
  22. namespace archive {
  23. class binary_wiarchive :
  24. public binary_iarchive_impl<
  25. binary_wiarchive, std::wistream::char_type, std::wistream::traits_type
  26. >
  27. {
  28. public:
  29. binary_wiarchive(std::wistream & is, unsigned int flags = 0) :
  30. binary_iarchive_impl<
  31. binary_wiarchive, std::wistream::char_type, std::wistream::traits_type
  32. >(is, flags)
  33. {}
  34. binary_wiarchive(std::wstreambuf & bsb, unsigned int flags = 0) :
  35. binary_iarchive_impl<
  36. binary_wiarchive, std::wistream::char_type, std::wistream::traits_type
  37. >(bsb, flags)
  38. {}
  39. };
  40. } // namespace archive
  41. } // namespace boost
  42. // required by export
  43. BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_wiarchive)
  44. #endif // BOOST_NO_STD_WSTREAMBUF
  45. #endif // BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP