X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwriter.h;h=241ea9a9d460a598c46a5a5a7e32b3329b8a060c;hb=b3b3fc2caf409f8c8ba523bbb3519af13b17e66e;hp=73471ac594b1f7ee7d523df3c9f2aa054cac5eb1;hpb=14d7dc66003ae52f8c4c25bf241b2a12264aacb2;p=libs%2Fdatafile.git diff --git a/source/writer.h b/source/writer.h index 73471ac..241ea9a 100644 --- a/source/writer.h +++ b/source/writer.h @@ -1,30 +1,24 @@ -/* $Id$ - -This file is part of libmspdatafile -Copyright © 2006 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_DATAFILE_WRITER_H_ #define MSP_DATAFILE_WRITER_H_ #include +#include #include -#include "binarydict.h" +#include "output.h" namespace Msp { namespace DataFile { -class Statement; +struct Statement; class WriterMode; /** Frontend for writing data. */ -class Writer +class Writer: private NonCopyable { private: - IO::Base &out; + Output out; WriterMode *mode; bool binary; @@ -45,6 +39,15 @@ public: @param b true for binary mode, false for text */ 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. */ + void set_float_precision(unsigned); }; } // namespace DataFile