derived2.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef BOOST_SERIALIZATION_TEST_DERIVED2_HPP
  2. #define BOOST_SERIALIZATION_TEST_DERIVED2_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. // derived2.hpp simple class test
  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. #include <boost/serialization/export.hpp>
  16. #include <boost/serialization/access.hpp>
  17. #define BASE_IMPORT
  18. #include "base.hpp"
  19. #if defined(DERIVED2_IMPORT)
  20. #define DLL_DECL BOOST_SYMBOL_IMPORT
  21. #elif defined(DERIVED2_EXPORT)
  22. #define DLL_DECL BOOST_SYMBOL_EXPORT
  23. #else
  24. #define DLL_DECL
  25. #endif
  26. class DLL_DECL derived2 :
  27. public base
  28. {
  29. friend class boost::serialization::access;
  30. template<class Archive>
  31. void serialize(Archive &ar, const unsigned int /* file_version */);
  32. public:
  33. ~derived2(){}
  34. };
  35. #undef DLL_DECL
  36. // MWerks users can do this to make their code work
  37. BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(base, derived2)
  38. #endif // BOOST_SERIALIZATION_TEST_DERIVED2_HPP