diff --git a/include/osi-utilities/tracefile/Reader.h b/include/osi-utilities/tracefile/Reader.h index 3aca09f..032d064 100644 --- a/include/osi-utilities/tracefile/Reader.h +++ b/include/osi-utilities/tracefile/Reader.h @@ -110,7 +110,7 @@ class TraceFileReader { /** * @brief Factory class for creating trace file readers based on file extensions */ -class TraceFileFactory { +class TraceFileReaderFactory { public: /** * @brief Creates a reader instance based on the file extension diff --git a/src/tracefile/reader/Reader.cpp b/src/tracefile/reader/Reader.cpp index 68bf0af..09b7bb0 100644 --- a/src/tracefile/reader/Reader.cpp +++ b/src/tracefile/reader/Reader.cpp @@ -9,18 +9,19 @@ #include "osi-utilities/tracefile/reader/TXTHTraceFileReader.h" #include "osi-utilities/tracefile/reader/MCAPTraceFileReader.h" -class TraceFileFactory { -public: - static std::unique_ptr createReader(const std::filesystem::path& path) { - if (path.extension().string() == ".osi") { - return std::make_unique(); - } - if (path.extension().string() == ".mcap") { - return std::make_unique(); - } - if (path.extension().string() == ".txth") { - return std::make_unique(); - } - throw std::invalid_argument("Unsupported format: " + path.extension().string()); +namespace osi3 { + +std::unique_ptr TraceFileReaderFactory::createReader(const std::filesystem::path& path) { + if (path.extension().string() == ".osi") { + return std::make_unique(); + } + if (path.extension().string() == ".mcap") { + return std::make_unique(); } -}; \ No newline at end of file + if (path.extension().string() == ".txth") { + return std::make_unique(); + } + throw std::invalid_argument("Unsupported format: " + path.extension().string()); +} + +} \ No newline at end of file