-
Notifications
You must be signed in to change notification settings - Fork 0
/
read.h
31 lines (23 loc) · 794 Bytes
/
read.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef __READ_H__
#define __READ_H__
#include <istream>
#include <string>
#include <utility>
#include <vector>
#include "base.h"
#include "document.h"
namespace csv {
struct ReadOptions {
char quotechar;
char separator;
int num_threads;
ReadOptions() : quotechar('"'), separator(','), num_threads(16) {}
ReadOptions(char quotechar, char separator, int num_threads)
: quotechar(quotechar), separator(separator), num_threads(num_threads) {}
};
std::vector<std::string> ColumnNames(std::istream& file_in, const std::string& path,
ReadOptions options = ReadOptions());
Document ReadCSV(const std::string& path, const std::vector<FieldType>& field_types,
ReadOptions options = ReadOptions());
} // namespace csv
#endif