diff options
author | claiff <claiff@mail.ru> | 2022-10-05 16:03:08 +0300 |
---|---|---|
committer | claiff <claiff@mail.ru> | 2022-10-05 16:03:08 +0300 |
commit | 8edef99a5b52643e0b919c424357752cbbc9a8dd (patch) | |
tree | c7ae9c113d29aa3350eca04f27a933bd3b5f769c /src/converter/file_to_string.cpp | |
parent | 2b03fece7f5895591eabd2f04baa2df19b4c3417 (diff) | |
parent | 3f1f70a3b945605c6abb7d23f46042b963db243a (diff) | |
download | obmc-sila-smtp-8edef99a5b52643e0b919c424357752cbbc9a8dd.tar.xz |
Merge branch 'refactor/3009'
Diffstat (limited to 'src/converter/file_to_string.cpp')
-rw-r--r-- | src/converter/file_to_string.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/converter/file_to_string.cpp b/src/converter/file_to_string.cpp new file mode 100644 index 0000000..3d8860e --- /dev/null +++ b/src/converter/file_to_string.cpp @@ -0,0 +1,24 @@ +#include "file_to_string.hpp" + +namespace smtp::converter +{ + + std::list<std::string> FileToString::Convert( manage::SettingsFileDataType const& from) const + { + std::list<std::string> result; + for(auto const& settings_line : from) + { + result.push_back(BuildParam(settings_line)); + } + return result; + } + + std::string FileToString::BuildParam( std::pair < std::string, std::string > const& data ) const + { + std::string result; + result += data.first; + result += '='; + result += data.second; + return result; + } +} |