1 #ifndef MSP_DATAFILE_WRITER_H_
2 #define MSP_DATAFILE_WRITER_H_
5 #include <msp/io/base.h>
15 Frontend for writing data.
29 Writes a statement to the output. This function always writes a complete
30 statement, so it's not possible to add substatements later.
32 void write(const Statement &st);
35 Sets binary or text mode. While it is possible to enter and exit binary
36 mode multiple times, doing so produces sub-optimal output.
38 @param b true for binary mode, false for text
40 void set_binary(bool b);
42 /** Enables output compression. Once enabled, it won't be possible to
43 disable compression. */
44 void set_compressed();
46 /** Sets the precision of floating point numbers in bits. Depending on the
47 mode not all values may be valid, but any value between 16 and 64 that is
48 divisible by 8 is guaranteed to work. */
49 void set_float_precision(unsigned);
52 } // namespace DataFile