Line | |
---|
1 | /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 |
---|
2 | // basic_archive.cpp: |
---|
3 | |
---|
4 | // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . |
---|
5 | // Use, modification and distribution is subject to the Boost Software |
---|
6 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at |
---|
7 | // http://www.boost.org/LICENSE_1_0.txt) |
---|
8 | |
---|
9 | // See http://www.boost.org for updates, documentation, and revision history. |
---|
10 | #include <utility> |
---|
11 | #include <boost/shared_ptr.hpp> |
---|
12 | |
---|
13 | #define BOOST_ARCHIVE_SOURCE |
---|
14 | #include <boost/archive/detail/auto_link_archive.hpp> |
---|
15 | #include <boost/archive/detail/basic_archive_impl.hpp> |
---|
16 | |
---|
17 | namespace boost { |
---|
18 | namespace archive { |
---|
19 | namespace detail { |
---|
20 | |
---|
21 | BOOST_ARCHIVE_DECL(void) |
---|
22 | basic_archive_impl::lookup_helper( |
---|
23 | const boost::serialization::extended_type_info * const eti, |
---|
24 | shared_ptr<void> & sph |
---|
25 | ){ |
---|
26 | helper_iterator it; |
---|
27 | const helper_type ht(sph, eti); |
---|
28 | it = m_helpers.find(ht); |
---|
29 | if(it == m_helpers.end()) |
---|
30 | sph.reset(); |
---|
31 | else |
---|
32 | sph = it->m_helper; |
---|
33 | } |
---|
34 | |
---|
35 | BOOST_ARCHIVE_DECL(void) |
---|
36 | basic_archive_impl::insert_helper( |
---|
37 | const boost::serialization::extended_type_info * const eti, |
---|
38 | shared_ptr<void> & sph |
---|
39 | ){ |
---|
40 | const helper_type ht(sph, eti); |
---|
41 | std::pair<helper_iterator, bool> result = m_helpers.insert(ht); |
---|
42 | } |
---|
43 | |
---|
44 | } // namespace detail |
---|
45 | } // namespace serialization |
---|
46 | } // namespace boost |
---|
Note: See
TracBrowser
for help on using the repository browser.