0.2.0
Loading...
Searching...
No Matches
CsvFile.hpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
13
14#pragma once
15
19
20namespace NAV
21{
23class CsvFile : public Node, FileReader
24{
25 public:
29 ~CsvFile() override;
31 CsvFile(const CsvFile&) = delete;
33 CsvFile(CsvFile&&) = delete;
35 CsvFile& operator=(const CsvFile&) = delete;
38
40 [[nodiscard]] static std::string typeStatic();
41
43 [[nodiscard]] std::string type() const override;
44
46 [[nodiscard]] static std::string category();
47
50 void guiConfig() override;
51
53 [[nodiscard]] json save() const override;
54
57 void restore(const json& j) override;
58
59 private:
61 bool initialize() override;
62
64 void deinitialize() override;
65
67 bool resetNode() override;
68
71 [[nodiscard]] FileType determineFileType() override;
72
74 void readHeader() override;
75
77 CsvData _data;
78
80 char _delimiter = ',';
81
83 char _comment = '#';
84
86 int _skipLines = 0;
87
89 bool _hasHeaderLine = true;
90};
91
92} // namespace NAV
CSV Data container.
Abstract File Reader class.
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
Node Class.
CSV Data container.
Definition CsvData.hpp:24
CSV File reader.
Definition CsvFile.hpp:24
void guiConfig() override
ImGui config window which is shown on double click.
CsvFile & operator=(CsvFile &&)=delete
Move assignment operator.
CsvFile(const CsvFile &)=delete
Copy constructor.
static std::string typeStatic()
String representation of the Class Type.
CsvFile()
Default constructor.
CsvFile(CsvFile &&)=delete
Move constructor.
CsvFile & operator=(const CsvFile &)=delete
Copy assignment operator.
std::string type() const override
String representation of the Class Type.
static std::string category()
String representation of the Class Category.
void restore(const json &j) override
Restores the node from a json object.
~CsvFile() override
Destructor.
json save() const override
Saves the node into a json object.
Abstract File Reader class.
Definition FileReader.hpp:31
FileType
File Type Enumeration.
Definition FileReader.hpp:35
Abstract parent class for all nodes.
Definition Node.hpp:86