| Line | Branch | Exec | Source |
|---|---|---|---|
| 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 | |||
| 9 | /// @file CsvData.hpp | ||
| 10 | /// @brief CSV Data container | ||
| 11 | /// @author T. Topp (topp@ins.uni-stuttgart.de) | ||
| 12 | /// @date 2022-06-18 | ||
| 13 | |||
| 14 | #pragma once | ||
| 15 | |||
| 16 | #include <vector> | ||
| 17 | #include <string> | ||
| 18 | #include <variant> | ||
| 19 | |||
| 20 | namespace NAV | ||
| 21 | { | ||
| 22 | /// CSV Data container | ||
| 23 | class CsvData | ||
| 24 | { | ||
| 25 | public: | ||
| 26 | /// @brief Returns the type of the data class | ||
| 27 | /// @return The data type | ||
| 28 |
1/2✓ Branch 1 taken 228 times.
✗ Branch 2 not taken.
|
684 | [[nodiscard]] static std::string type() { return "CsvData"; } |
| 29 | |||
| 30 | /// CSV Elements (number or if not convertible to number as std::string) | ||
| 31 | using CsvElement = std::variant<double, std::string>; | ||
| 32 | |||
| 33 | /// CSV Line with splitted entries | ||
| 34 | using CsvLine = std::vector<CsvElement>; | ||
| 35 | |||
| 36 | /// Data description | ||
| 37 | std::vector<std::string> description; | ||
| 38 | /// Data container | ||
| 39 | std::vector<CsvLine> lines; | ||
| 40 | }; | ||
| 41 | |||
| 42 | } // namespace NAV | ||
| 43 |