mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Start TEngine3.0
Start TEngine3.0
This commit is contained in:
36
Luban/Luban.ClientServer/Templates/config/protobuf3/all.tpl
Normal file
36
Luban/Luban.ClientServer/Templates/config/protobuf3/all.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package {{x.namespace}};
|
||||
|
||||
// luban internal types begin
|
||||
message Vector2 {
|
||||
float x = 1;
|
||||
float y = 2;
|
||||
}
|
||||
|
||||
message Vector3 {
|
||||
float x = 1;
|
||||
float y = 2;
|
||||
float z = 3;
|
||||
}
|
||||
|
||||
message Vector4 {
|
||||
float x = 1;
|
||||
float y = 2;
|
||||
float z = 3;
|
||||
float w = 4;
|
||||
}
|
||||
// luban internal types end
|
||||
|
||||
{{~for enum in x.enums ~}}
|
||||
{{enum}}
|
||||
{{~end~}}
|
||||
|
||||
{{~for bean in x.beans~}}
|
||||
{{bean}}
|
||||
{{~end~}}
|
||||
|
||||
{{~for table in x.tables~}}
|
||||
{{table}}
|
||||
{{~end~}}
|
||||
|
20
Luban/Luban.ClientServer/Templates/config/protobuf3/bean.tpl
Normal file
20
Luban/Luban.ClientServer/Templates/config/protobuf3/bean.tpl
Normal file
@@ -0,0 +1,20 @@
|
||||
{{~
|
||||
name = x.name
|
||||
parent_def_type = x.parent_def_type
|
||||
export_fields = x.export_fields
|
||||
hierarchy_export_fields = x.hierarchy_export_fields
|
||||
~}}
|
||||
|
||||
message {{x.pb_full_name}} {
|
||||
{{~if x.is_abstract_type ~}}
|
||||
oneof value {
|
||||
{{~for c in x.hierarchy_not_abstract_children~}}
|
||||
{{c.pb_full_name}} {{c.name}} = {{c.auto_id}};
|
||||
{{~end~}}
|
||||
}
|
||||
{{~else~}}
|
||||
{{~for f in hierarchy_export_fields ~}}
|
||||
{{protobuf3_pre_decorator f.ctype}} {{protobuf_define_type f.ctype}} {{f.name}} = {{f.auto_id}} {{protobuf_suffix_options f.ctype}};
|
||||
{{~end~}}
|
||||
{{~end~}}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
{{~
|
||||
name = x.name
|
||||
key_type = x.key_ttype
|
||||
value_type = x.value_ttype
|
||||
~}}
|
||||
|
||||
message {{x.pb_full_name}} {
|
||||
repeated {{protobuf_define_type value_type}} data_list = 1 [packed = false];
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{{~
|
||||
name = x.name
|
||||
namespace = x.namespace
|
||||
tables = x.tables
|
||||
~}}
|
Reference in New Issue
Block a user