|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r52188 - trunk/boost/spirit/home/support/detail/lexer
From: jamin.hanson_at_[hidden]
Date: 2009-04-05 08:25:39
Author: ben_hanson
Date: 2009-04-05 08:25:38 EDT (Sun, 05 Apr 2009)
New Revision: 52188
URL: http://svn.boost.org/trac/boost/changeset/52188
Log:
New data() interface on state_machine.
Text files modified:
trunk/boost/spirit/home/support/detail/lexer/serialise.hpp | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
Modified: trunk/boost/spirit/home/support/detail/lexer/serialise.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/serialise.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/serialise.hpp 2009-04-05 08:25:38 EDT (Sun, 05 Apr 2009)
@@ -1,11 +1,12 @@
// examples/serialise.hpp
-// Copyright (c) 2007-2008 Ben Hanson (http://www.benhanson.net/)
+// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_LEXER_SERIALISE_HPP
#define BOOST_LEXER_SERIALISE_HPP
+#include "internals.hpp"
#include "state_machine.hpp"
#include <boost/serialization/vector.hpp>
@@ -17,12 +18,14 @@
template<typename CharT, class Archive>
void serialise (basic_state_machine<CharT> &sm_, Archive &ar_, unsigned int version_ = 1)
{
+ detail::internals &internals_ = const_cast<detail::internals &>(sm_.data ());
+
ar_ & version_;
- ar_ & *sm_._lookup;
- ar_ & sm_._dfa_alphabet;
- ar_ & *sm_._dfa;
- ar_ & sm_._seen_BOL_assertion;
- ar_ & sm_._seen_EOL_assertion;
+ ar_ & *internals_._lookup;
+ ar_ & internals_._dfa_alphabet;
+ ar_ & *internals_._dfa;
+ ar_ & internals_._seen_BOL_assertion;
+ ar_ & internals_._seen_EOL_assertion;
}
}
}
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