mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 04:54:29 -04:00
Add commit 43aab01 of BenHanson/lexertl14 from github
This commit is contained in:
committed by
Luis Ángel San Martín
parent
c4f792bd40
commit
d3de52ca82
28
YACReaderLibrary/lexertl/serialise.hpp
Normal file
28
YACReaderLibrary/lexertl/serialise.hpp
Normal file
@ -0,0 +1,28 @@
|
||||
// serialise.hpp
|
||||
// Copyright (c) 2007-2018 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 LEXERTL_SERIALISE_HPP
|
||||
#define LEXERTL_SERIALISE_HPP
|
||||
|
||||
#include "state_machine.hpp"
|
||||
#include <boost/serialization/vector.hpp>
|
||||
|
||||
namespace lexertl
|
||||
{
|
||||
// IMPORTANT! This won't work if you don't enable RTTI!
|
||||
template<typename CharT, typename id_type, class Archive>
|
||||
void serialise(basic_state_machine<CharT, id_type> &sm_, Archive &ar_)
|
||||
{
|
||||
detail::basic_internals<id_type> &internals_ = sm_.data();
|
||||
|
||||
ar_ & internals_._eoi;
|
||||
ar_ & *internals_._lookup;
|
||||
ar_ & internals_._dfa_alphabet;
|
||||
ar_ & internals_._features;
|
||||
ar_ & *internals_._dfa;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user