]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/writer.h
Add an abstraction layer for output
[libs/datafile.git] / source / writer.h
index 159bf9552f2ca68c80f740c4f88b222b7a736dd1..df308266d976810217be152efec93d8f2a75b77a 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <map>
 #include <msp/io/base.h>
-#include "binarydict.h"
+#include "output.h"
 
 namespace Msp {
 namespace DataFile {
@@ -17,7 +17,7 @@ Frontend for writing data.
 class Writer
 {
 private:
-       IO::Base &out;
+       Output out;
        WriterMode *mode;
        bool binary;
 
@@ -38,6 +38,11 @@ public:
        @param  b  true for binary mode, false for text
        */
        void set_binary(bool b);
+
+       /** 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