Forest_Client/Tool/Luban/Luban.ClientServer/Templates/common/cpp/enum.tpl

25 lines
442 B
Smarty
Raw Normal View History

2024-06-12 15:01:54 +08:00
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
{{x.cpp_namespace_begin}}
{{~if comment != '' ~}}
/**
* {{comment | html.escape}}
*/
{{~end~}}
enum class {{name}}
{
{{~ for item in items ~}}
{{~if item.comment != '' ~}}
/**
* {{item.escape_comment}}
*/
{{~end~}}
{{item.name}} = {{item.value}},
{{~end~}}
};
{{x.cpp_namespace_end}}