00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __sella__file__GZCSVPathWriter_H__
00010 #define __sella__file__GZCSVPathWriter_H__
00011
00012 #include "../util/CommonMacro.h"
00013 #include "IOException.h"
00014
00015 #include <stdint.h>
00016 #include <zlib.h>
00017
00018 #include <string>
00019 #include <vector>
00020 #include <memory>
00021
00022 namespace sella {
00023 namespace file {
00024 class GZCSVPathWriter;
00025 }
00026 }
00027
00031 class sella::file::GZCSVPathWriter {
00032 public:
00033
00034 STANDARD_TYPEDEF(sella::file::GZCSVPathWriter);
00035
00036 static const char * FileSuffix;
00037
00038 static const char DefaultDelimiter = 0x1e;
00039 static const char DefaultSeperator = 0x1d;
00040
00041
00042 GZCSVPathWriter(const std::string & path, char delimiter = DefaultDelimiter, char seperator = DefaultSeperator) THROWS(IOException);
00043
00044
00045 void write(const std::vector<std::vector<std::string>> & data) THROWS(IOException);
00046
00047 private:
00048 std::string path;
00049
00050 char delimiter;
00051 char seperator;
00052
00053 uint64_t sequence;
00054 };
00055
00056 #endif
00057
00058
00059
00060