X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Fwriter.cpp;h=60914090f742acaa97b90f1f1f9c58fd03756523;hp=bfd0edac784227efa21b8f30b7dd72e5bcdc3325;hb=19179a622c1de88de5ed7047643eec79f285bf2a;hpb=14d7dc66003ae52f8c4c25bf241b2a12264aacb2 diff --git a/source/writer.cpp b/source/writer.cpp index bfd0eda..6091409 100644 --- a/source/writer.cpp +++ b/source/writer.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspdatafile -Copyright © 2006 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include "binarywriter.h" #include "statement.h" #include "textwriter.h" @@ -36,21 +29,26 @@ void Writer::set_binary(bool b) if(b==binary) return; - binary=b; + binary = b; Statement st; if(binary) - st.keyword="__bin"; + st.keyword = "__bin"; else - st.keyword="__text"; + st.keyword = "__text"; mode->write(st); delete mode; if(binary) - mode=new BinaryWriter(out); + mode = new BinaryWriter(out); else - mode=new TextWriter(out); + mode = new TextWriter(out); +} + +void Writer::set_float_precision(unsigned fp) +{ + mode->set_float_precision(fp); } } // namespace DataFile