CSV.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5
6#include <map>
7#include <memory>
8#include <string>
9
10// ----------------------------------------------------------------------------
12class CDM_DECL CSV
13{
14public:
18 CSV(std::string const& path);
19
20 CSV(CSV&&);
21 ~CSV();
22
23 bool NextRecord();
24
25 std::string NextValue(unsigned skip = 0);
26
27 double NextValueAsDouble(unsigned skip = 0);
28
29 std::string Record() const;
30
31 static void SplitCSV(const std::string& originalCSV, const std::map<std::string, std::vector<std::string>>& fileMapping);
32
33private:
34 CSV(CSV const&) = delete;
35
36 class Private;
37 std::unique_ptr<Private> m_p;
38};
Definition: CSV.cpp:37
Utility class to read a CSV file.
Definition: CSV.h:13
CSV(CSV const &)=delete
std::unique_ptr< Private > m_p
Definition: CSV.h:37

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.