X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwriter.h;h=05ab369f439e3d94bf3d94e5a2a6b04364c9b914;hb=refs%2Fheads%2Fwip;hp=c8d75e32dcd643bb09e3ec281331800691c99e02;hpb=19179a622c1de88de5ed7047643eec79f285bf2a;p=libs%2Fdatafile.git diff --git a/source/writer.h b/source/writer.h index c8d75e3..05ab369 100644 --- a/source/writer.h +++ b/source/writer.h @@ -2,24 +2,26 @@ #define MSP_DATAFILE_WRITER_H_ #include +#include #include -#include "binarydict.h" +#include "mspdatafile_api.h" +#include "output.h" namespace Msp { namespace DataFile { -class Statement; +struct Statement; class WriterMode; /** Frontend for writing data. */ -class Writer +class MSPDATAFILE_API Writer: private NonCopyable { private: - IO::Base &out; - WriterMode *mode; - bool binary; + Output out; + WriterMode *mode = nullptr; + bool binary = false; public: Writer(IO::Base &o); @@ -39,6 +41,10 @@ public: */ void set_binary(bool b); + /** Enables output compression. Once enabled, it won't be possible to + disable compression. */ + void set_compressed(); + /** Sets the precision of floating point numbers in bits. Depending on the mode not all values may be valid, but any value between 16 and 64 that is divisible by 8 is guaranteed to work. */