}
if (direction == ParameterType::Direction::IN)
- return GetHandlePrefix() + "_" + block_id + "_" + type_id + " ";
+ return GetHandlePrefix() + "_" + block_id + "_" + type_id + "_e ";
else
- return GetHandlePrefix() + "_" + block_id + "_" + type_id + " *";
+ return GetHandlePrefix() + "_" + block_id + "_" + type_id + "_e *";
}
std::string CGeneratorBase::GetParamTypeString(
for (auto& e : block.GetEnums()) {
std::string enums;
for (auto& f : e->GetFields()) {
+ enums += GetHandlePrefix() + "_" + e->GetID() + "_" + block.GetID() + "_";
if (f->GetValue().empty())
enums += f->GetID() + "," + NLine(1);
else
enums += f->GetID() + " = " + f->GetValue() + "," + NLine(1);
}
- ReplaceAll(CB_ENUM_BASE, {{"<ENUMS>", enums},
- {"<PREFIX>", GetHandlePrefix()},
- {"<NAME>", e->GetID()},
- {"<OWNER_NAME>", block.GetID()}})
- .Transform([&](std::string str) { return SmartIndent(str); })
+ ReplaceAll(CB_ENUM_BASE)
+ .ChangeToUpper("<ENUMS>", enums)
+ .Change("<PREFIX>", GetHandlePrefix())
+ .Change("<NAME>", e->GetID())
+ .Change("<OWNER_NAME>", block.GetID())
+ .Transform([&](std::string code) { return SmartIndent(code); })
.Out(stream);
}
}
auto& type = elm->GetType();
std::string id;
- auto n = type.ToString().find('.');
+ auto pos = type.ToString().find('.');
if (type.GetUserDefinedType() == BaseType::UserType::ENUM &&
- n == std::string::npos)
+ pos == std::string::npos)
id = GetEnumBockString(type.ToString());
else
id = st.GetID();