From 9980c9f15ef993503cde47714e7dbea852f2b6ba Mon Sep 17 00:00:00 2001 From: sunwen Date: Fri, 23 Feb 2024 17:08:18 +0800 Subject: [PATCH] Add getPath and getFileList. --- src/Parser.cpp | 10 ++++++++++ src/Parser.h | 3 +++ src/ParserPrivate.cpp | 11 ++++++++++- src/ParserPrivate.h | 2 ++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Parser.cpp b/src/Parser.cpp index 711a9a0..1b93819 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -109,3 +109,13 @@ bool Parser::verifyHashValue() { return mPrivate->verifyHashValue(); } + +std::string Parser::getPath() +{ + return mPrivate->getPath(); +} + +std::vector Parser::getFileList() +{ + return mPrivate->getFileList(); +} diff --git a/src/Parser.h b/src/Parser.h index 090f4cf..f939681 100644 --- a/src/Parser.h +++ b/src/Parser.h @@ -5,6 +5,7 @@ #include #include +#include class ParserPrivate; class AScanData; @@ -27,6 +28,8 @@ public: Parser(const std::string& aPath); ~Parser(); void setPath(const std::string& aPath); + std::string getPath(); + std::vector getFileList(); void setDataLength(unsigned long long aLength); unsigned long long getDataLength(); AScanData getAscanDataOfMotorPosition(const TasElementIndex& aSenderIndex,const TasElementIndex& aReceiverIndex, MotorPosition aMotorPosition, ShotList* aShotList = nullptr); diff --git a/src/ParserPrivate.cpp b/src/ParserPrivate.cpp index 3d9becf..73d3395 100644 --- a/src/ParserPrivate.cpp +++ b/src/ParserPrivate.cpp @@ -881,6 +881,16 @@ TemperatureData ParserPrivate::getTemperatureData() return mTemperatureData; } +std::string ParserPrivate::getPath() +{ + return mPath; +} + +std::vector ParserPrivate::getFileList() +{ + return mFileList; +} + bool ParserPrivate::hasCEMeasured() { switch (mMode) @@ -937,4 +947,3 @@ std::string ParserPrivate::getHashValue() delete[] hashValue; return md5Hex; } - diff --git a/src/ParserPrivate.h b/src/ParserPrivate.h index e4a5efe..b472fe5 100644 --- a/src/ParserPrivate.h +++ b/src/ParserPrivate.h @@ -33,6 +33,8 @@ public: ParserPrivate(const ParserPrivate& aParserPrivate); void setPath(const std::string& aPath); + std::string getPath(); + std::vector getFileList(); void setDataLength(unsigned long long aLength); unsigned long long getDataLength(); AScanData getAscanDataOfMotorPosition(const TasElementIndex& aSenderIndex,const TasElementIndex& aReceiverIndex, MotorPosition aMotorPosition, ShotList* aShotList);