binary_woarchive.hpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP
  2. #define BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
  8. // binary_woarchive.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 <ostream>
  19. #include <boost/archive/binary_oarchive_impl.hpp>
  20. #include <boost/archive/detail/register_archive.hpp>
  21. namespace boost {
  22. namespace archive {
  23. // do not derive from this class. If you want to extend this functionality
  24. // via inhertance, derived from binary_oarchive_impl instead. This will
  25. // preserve correct static polymorphism.
  26. class binary_woarchive :
  27. public binary_oarchive_impl<
  28. binary_woarchive, std::wostream::char_type, std::wostream::traits_type
  29. >
  30. {
  31. public:
  32. binary_woarchive(std::wostream & os, unsigned int flags = 0) :
  33. binary_oarchive_impl<
  34. binary_woarchive, std::wostream::char_type, std::wostream::traits_type
  35. >(os, flags)
  36. {}
  37. binary_woarchive(std::wstreambuf & bsb, unsigned int flags = 0) :
  38. binary_oarchive_impl<
  39. binary_woarchive, std::wostream::char_type, std::wostream::traits_type
  40. >(bsb, flags)
  41. {}
  42. };
  43. typedef binary_woarchive naked_binary_woarchive;
  44. } // namespace archive
  45. } // namespace boost
  46. // required by export
  47. BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_woarchive)
  48. #endif // BOOST_NO_STD_WSTREAMBUF
  49. #endif // BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP