modelbox::Solution

函数 作用
构造方法 创建solution
SetSolutionDir 设置solution的路径
SetArgs 设置solution的参数
GetSolutionDir 获取solution的路径
GetSolutionName 获取solution的名字

构造方法

创建solution

    Solution(const std::string &solution_name);

args:

  • solution_name (string) —— solution对象的名字

return:

modelbox::Solution Solution对象

SetSolutionDir

设置solution的路径

    void SetSolutionDir(const std::string &dir);

args:

  • dir (string) —— 设置solution对象的路径

return:

SetArgs

设置solution的参数

    Solution &SetArgs(const std::string &key, const std::string &value);

args:

  • key (string) —— 设置solution参数的key值
  • value (string) —— 设置solution参数的value值

return:

modelbox::Solution

GetSolutionDir

获取solution对象的路径

    const std::string GetSolutionDir() const;

args:

return:

string solution对象的路径

GetSolutionName

获取solution对象的名字

    const std::string GetSolutionName() const;

args:

return:

string solution对象的名字

example:

    #include <modelbox/flow.h>

    int main() {
        string path = "test/solution/path";
        strint name = "test_solution";
        Solution solution(name);

        solution.SetSolutionDir(path);
        auto get_name = solution.GetSolutionName();
        auto get_path = solution.GetSolutionDir();

        solution.SetArgs("key1", "value1").SetArgs("key2", "value2");
        MBLOG_INFO << get_name << ", " << get_path;

        return 0;
    }

result:

test_solution, test/solution/path

©2022 ModelBox Team all right reserved,powered by Gitbook文件修订时间: 2022-09-16 08:17:12

results matching ""

    No results matching ""