libutil++  1.9.3
 All Classes Functions Variables
GZCSVPathWriter.h
1 /*
2 ** libutil++
3 ** $Id: GZCSVPathWriter.h 1653 2016-02-28 19:54:59Z sella $
4 ** Copyright (c) 2011-2016 Digital Genesis, LLC. All Rights Reserved.
5 ** Released under the LGPL Version 2.1 License.
6 ** http://www.digitalgenesis.com
7 */
8 
9 #ifndef __sella__file__GZCSVPathWriter_H__
10 #define __sella__file__GZCSVPathWriter_H__
11 
12 #include "../util/CommonMacro.h"
13 #include "IOException.h"
14 
15 #include <stdint.h>
16 #include <zlib.h>
17 
18 #include <string>
19 #include <vector>
20 #include <memory>
21 
22 namespace sella {
23  namespace file {
24  class GZCSVPathWriter;
25  }
26 }
27 
32  public:
33  // Public Type Definitions
34  STANDARD_TYPEDEF(sella::file::GZCSVPathWriter);
35 
36  static const char * FileSuffix;
37 
38  static const char DefaultDelimiter = 0x1e;
39  static const char DefaultSeperator = 0x1d;
40 
41  // Constructors
42  GZCSVPathWriter(const std::string & path, char delimiter = DefaultDelimiter, char seperator = DefaultSeperator) THROWS(IOException);
43 
44  // Public Member Functions
45  void write(const std::vector<std::vector<std::string>> & data) THROWS(IOException);
46 
47  private:
48  std::string path;
49 
50  char delimiter;
51  char seperator;
52 
53  uint64_t sequence;
54 };
55 
56 #endif
57 
58 /*
59 ** vim: noet ts=3 sw=3
60 */
static const char DefaultDelimiter
The default delimiter used between the fields of a record; the ASCII record seperator character...
static const char DefaultSeperator
The default seperator used between the records of a file; the ASCII group seperator character...
void write(const std::vector< std::vector< std::string >> &data) THROWS(IOException)
GZCSVPathWriter(const std::string &path, char delimiter=DefaultDelimiter, char seperator=DefaultSeperator) THROWS(IOException)
static const char * FileSuffix
The file suffix for matching files in the directory for reading.
A GZIP compressed CSV path writer.