tables.sbn 550 B

1234567891011121314151617181920212223
  1. class {{__name}}
  2. {
  3. public:
  4. {{~for table in __tables ~}}
  5. {{~if table.comment != '' ~}}
  6. /**
  7. * {{escape_comment table.comment}}
  8. */
  9. {{~end~}}
  10. {{make_cpp_name table.full_name}} {{table.name}};
  11. {{~end~}}
  12. bool load(::luban::Loader<::luban::ByteBuf> loader)
  13. {
  14. ::luban::ByteBuf buf;
  15. {{~for table in __tables~}}
  16. buf.clear();
  17. if (!loader(buf, "{{table.output_data_file}}")) return false;
  18. if (!{{table.name}}.load(buf)) return false;
  19. {{~end~}}
  20. return true;
  21. }
  22. };