aboutsummaryrefslogtreecommitdiff
path: root/include/openvic-dataloader/csv/Parser.hpp
diff options
context:
space:
mode:
author Spartan322 <Megacake1234@gmail.com>2023-09-03 23:54:18 +0200
committer Spartan322 <Megacake1234@gmail.com>2023-09-04 18:22:33 +0200
commita705b0223664f915d8bb00d4f89e05838da3e4bc (patch)
tree9833fa669651e04dea81b9b2b5875a8d21ea938e /include/openvic-dataloader/csv/Parser.hpp
parent027828532837673a3631c8a9a8128f9b89a9db43 (diff)
Add Windows-1252 CSV Parser
Fix CsvGrammar counting behavior Add csv parse argument to headless/main.cpp Change LineObject contained value type to pair Add ostream print to LineObject Add vscode tasks.json Add vscode launch.json Move csv::Parser template class specialization to end of Parser.cpp Add detail/ClassExport.hpp to assist compiler export
Diffstat (limited to 'include/openvic-dataloader/csv/Parser.hpp')
-rw-r--r--include/openvic-dataloader/csv/Parser.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/openvic-dataloader/csv/Parser.hpp b/include/openvic-dataloader/csv/Parser.hpp
index 0bd0670..fadaf3a 100644
--- a/include/openvic-dataloader/csv/Parser.hpp
+++ b/include/openvic-dataloader/csv/Parser.hpp
@@ -4,6 +4,12 @@
#include <openvic-dataloader/detail/BasicParser.hpp>
namespace ovdl::csv {
+ enum class EncodingType {
+ Windows1252,
+ Utf8
+ };
+
+ template<EncodingType Encoding = EncodingType::Windows1252>
class Parser final : public detail::BasicParser {
public:
Parser();
@@ -39,4 +45,7 @@ namespace ovdl::csv {
template<typename... Args>
constexpr void _run_load_func(detail::LoadCallback<BufferHandler, Args...> auto func, Args... args);
};
+
+ using Windows1252Parser = Parser<EncodingType::Windows1252>;
+ using Utf8Parser = Parser<EncodingType::Utf8>;
} \ No newline at end of file