]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/binarywriter.h
Use the metadata for type.h in binary write/parse functions
[libs/datafile.git] / source / binarywriter.h
index 15a88a391da8f7e07b775f971300834e46378ad8..4d18196663d377e9bdf992748a9021e0a845e902 100644 (file)
@@ -1,15 +1,9 @@
-/* $Id$
-
-This file is part of libmspdatafile
-Copyright © 2007-2008, 2010  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_DATAFILE_BINARYWRITER_H_
 #define MSP_DATAFILE_BINARYWRITER_H_
 
 #include <map>
 #include "binarydict.h"
+#include "type.h"
 #include "writermode.h"
 
 namespace Msp {
@@ -31,14 +25,15 @@ private:
 
 public:
        BinaryWriter(IO::Base &o);
-       void write(const Statement &st);
+
+       virtual void write(const Statement &st);
 private:
        void write_(const Statement &st);
        void collect_keywords(const Statement &st);
-       void write_int(long long n);
-       void write_string(const std::string &s);
-       void write_float(float f);
-       void write_enum(const std::string &e);
+       void write_int(IntType::Store n);
+       void write_string(const StringType::Store &s);
+       void write_float(FloatType::Store f);
+       void write_symbol(const SymbolType::Store &s);
 };
 
 } // namespace DataFile