diff --git a/source-code/source/plugins/TLAC/FileSystem/ConfigFile.cpp b/source-code/source/plugins/TLAC/FileSystem/ConfigFile.cpp index 379fda2..76d2e5d 100644 --- a/source-code/source/plugins/TLAC/FileSystem/ConfigFile.cpp +++ b/source-code/source/plugins/TLAC/FileSystem/ConfigFile.cpp @@ -47,6 +47,14 @@ namespace TLAC::FileSystem return found ? (float)atof(pair->second.c_str()) : 0.0f; } + std::string ConfigFile::GetStringValue(const std::string& key) + { + auto pair = ConfigMap.find(key); + bool found = pair != ConfigMap.end(); + + return found ? pair->second : ""; + } + void ConfigFile::Parse(std::ifstream &fileStream) { std::string line; diff --git a/source-code/source/plugins/TLAC/FileSystem/ConfigFile.h b/source-code/source/plugins/TLAC/FileSystem/ConfigFile.h index 8f453ea..bf96e27 100644 --- a/source-code/source/plugins/TLAC/FileSystem/ConfigFile.h +++ b/source-code/source/plugins/TLAC/FileSystem/ConfigFile.h @@ -17,6 +17,7 @@ namespace TLAC::FileSystem int GetIntegerValue(const std::string& key); bool GetBooleanValue(const std::string& key); float GetFloatValue(const std::string& key); + std::string GetStringValue(const std::string& key); protected: virtual void Parse(std::ifstream &fileStream) override;