|
Boost-Commit : |
From: hartmut.kaiser_at_[hidden]
Date: 2008-05-10 19:36:34
Author: hkaiser
Date: 2008-05-10 19:36:33 EDT (Sat, 10 May 2008)
New Revision: 45272
URL: http://svn.boost.org/trac/boost/changeset/45272
Log:
Wave: started to fix serialization support
Text files modified:
trunk/boost/wave/util/macro_definition.hpp | 2 ++
trunk/boost/wave/util/symbol_table.hpp | 11 +++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
Modified: trunk/boost/wave/util/macro_definition.hpp
==============================================================================
--- trunk/boost/wave/util/macro_definition.hpp (original)
+++ trunk/boost/wave/util/macro_definition.hpp 2008-05-10 19:36:33 EDT (Sat, 10 May 2008)
@@ -169,6 +169,7 @@
#endif
};
+#if BOOST_WAVE_SERIALIZATION == 0
///////////////////////////////////////////////////////////////////////////////
template <typename TokenT, typename ContainerT>
inline void
@@ -184,6 +185,7 @@
if (--p->use_count == 0)
delete p;
}
+#endif
///////////////////////////////////////////////////////////////////////////////
} // namespace util
Modified: trunk/boost/wave/util/symbol_table.hpp
==============================================================================
--- trunk/boost/wave/util/symbol_table.hpp (original)
+++ trunk/boost/wave/util/symbol_table.hpp 2008-05-10 19:36:33 EDT (Sat, 10 May 2008)
@@ -19,6 +19,9 @@
#if BOOST_WAVE_SERIALIZATION != 0
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/map.hpp>
+#include <boost/shared_ptr.hpp>
+#else
+#include <boost/intrusive_ptr.hpp>
#endif
#include <boost/iterator/transform_iterator.hpp>
@@ -41,9 +44,17 @@
template <typename StringT, typename MacroDefT>
struct symbol_table
+#if BOOST_WAVE_SERIALIZATION != 0
+: public std::map<StringT, boost::shared_ptr<MacroDefT> >
+#else
: public std::map<StringT, boost::intrusive_ptr<MacroDefT> >
+#endif
{
+#if BOOST_WAVE_SERIALIZATION != 0
+ typedef std::map<StringT, boost::shared_ptr<MacroDefT> > base_type;
+#else
typedef std::map<StringT, boost::intrusive_ptr<MacroDefT> > base_type;
+#endif
typedef typename base_type::iterator iterator_type;
typedef typename base_type::const_iterator const_iterator_type;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk