/Src/Dependencies/Boost/boost/archive/impl/basic_binary_oarchive.ipp

http://hadesmem.googlecode.com/ · C++ Header · 46 lines · 27 code · 8 blank · 11 comment · 0 complexity · 7d4741098a851a743f47d99fb70efe63 MD5 · raw file

  1. /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
  2. // basic_binary_oarchive.ipp:
  3. // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
  4. // Use, modification and distribution is subject to the Boost Software
  5. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. // See http://www.boost.org for updates, documentation, and revision history.
  8. #include <string>
  9. #include <boost/assert.hpp>
  10. #include <algorithm>
  11. #include <cstring>
  12. #include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME
  13. #if defined(BOOST_NO_STDC_NAMESPACE)
  14. namespace std{
  15. using ::memcpy;
  16. }
  17. #endif
  18. #include <boost/archive/basic_binary_oarchive.hpp>
  19. namespace boost {
  20. namespace archive {
  21. /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
  22. // implementation of binary_binary_oarchive
  23. template<class Archive>
  24. #if !defined(__BORLANDC__)
  25. BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
  26. #else
  27. void
  28. #endif
  29. basic_binary_oarchive<Archive>::init(){
  30. // write signature in an archive version independent manner
  31. const std::string file_signature(BOOST_ARCHIVE_SIGNATURE());
  32. * this->This() << file_signature;
  33. // write library version
  34. const library_version_type v(BOOST_ARCHIVE_VERSION());
  35. * this->This() << v;
  36. }
  37. } // namespace archive
  38. } // namespace boost