3 * LyX eXternalization Template Library
5 * ======================================================
7 * LyX, The Document Processor
9 * Copyright 1995 Matthias Ettrich
10 * Copyright 1995-2000 The LyX Team.
12 * This file Copyright 2000
14 * ======================================================
19 #include <xtl/autobuf.h>
20 #include <xtl/objio.h>
24 // XDR_format causes an abort that's hard to track down. GDB says the abort
25 // occurs in code from a different function to the one being run before the
26 // abort! (XTL-1.3.pl.11)
28 typedef GIOP_format<auto_mem_buffer> gui_format;
30 /* Simplify the use of the XTL. The caller is responsible for creating their
31 own memory buffer. The buffer type isn't a template parameter because I
32 need/want the forward declared buffer class in some other header files
33 thereby avoiding an extra file dependency.
37 /// Externalize a structure into a buffer.
39 void getInMem(Input const & in, auto_mem_buffer & mb) {
41 obj_output<gui_format> output(gf);
46 /// Internalize a structure from a buffer.
48 void setFromMem(Input & in, auto_mem_buffer & mb) {
50 obj_input<gui_format> input(gf);