| 49 | } |
| 50 | |
| 51 | void SimpleScanner::Load(yistream* s) |
| 52 | { |
| 53 | SimpleScanner sc; |
| 54 | Impl::ValidateHeader(s, ScannerIOTypes::SimpleScanner, sizeof(sc.m)); |
| 55 | LoadPodType(s, sc.m); |
| 56 | Impl::AlignLoad(s, sizeof(sc.m)); |
| 57 | bool empty; |
| 58 | LoadPodType(s, empty); |
| 59 | Impl::AlignLoad(s, sizeof(empty)); |
| 60 | if (empty) { |
| 61 | sc.Alias(Null()); |
| 62 | } else { |
| 63 | sc.m_buffer = BufferType(new char[sc.BufSize()]); |
| 64 | Impl::AlignedLoadArray(s, sc.m_buffer.Get(), sc.BufSize()); |
| 65 | sc.Markup(sc.m_buffer.Get()); |
| 66 | sc.m.initial += reinterpret_cast<size_t>(sc.m_transitions); |
| 67 | } |
| 68 | Swap(sc); |
| 69 | } |
| 70 | |
| 71 | void SlowScanner::Save(yostream* s) const |
| 72 | { |
nothing calls this directly
no test coverage detected