summaryrefslogtreecommitdiff
path: root/src/converter/file_to_string.cpp
blob: 3d8860efc762f46d3255c0681b576845cddc6a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
    }
}