初始化工程
This commit is contained in:
23
Config/Tools/Luban/Templates/cpp-rawptr-bin/tables.sbn
Normal file
23
Config/Tools/Luban/Templates/cpp-rawptr-bin/tables.sbn
Normal file
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user