设置一个字符串类型的属性值到算子中。
1 | bool SetStrAttrVal(const char *attr_name, const char *val) const |
参数 |
输入/输出 |
说明 |
|---|---|---|
attr_name |
输入 |
属性名。 |
val |
输入 |
要设置的字符串。 |
表示是否成功设置该属性值。
无
1 2 3 4 5 6 | bool SetStrAttrVal(ExeResGenerationContext* context) { std::string attr_name = ""; std::string val = ""; bool result = context->SetStrAttrVal(attr_name.c_str(),val.c_str()); // ... } |