IndieGame/config/Table/Tools/Luban/Templates/cpp-rawptr-bin/tables.sbn
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

24 lines
550 B
Plaintext

class {{__name}}
{
public:
{{~for table in __tables ~}}
{{~if table.comment != '' ~}}
/**
* {{escape_comment table.comment}}
*/
{{~end~}}
{{make_cpp_name table.full_name}} {{table.name}};
{{~end~}}
bool load(::luban::Loader<::luban::ByteBuf> loader)
{
::luban::ByteBuf buf;
{{~for table in __tables~}}
buf.clear();
if (!loader(buf, "{{table.output_data_file}}")) return false;
if (!{{table.name}}.load(buf)) return false;
{{~end~}}
return true;
}
};