diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-27 19:04:50 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-27 19:04:50 +0200 |
| commit | 687910bc052e1430c8132a5eefe63e20ba6937e0 (patch) | |
| tree | 0ec042a8a5cad0615a82d1e10862a904efe79762 /Software/Visual_Studio/Tango.CodeGeneration/Templates | |
| parent | f1a77b05c2e56cd073180803947aa991a09f9b40 (diff) | |
| download | Tango-687910bc052e1430c8132a5eefe63e20ba6937e0.tar.gz Tango-687910bc052e1430c8132a5eefe63e20ba6937e0.zip | |
Implemented PMR Generator for hardware objects !
Diffstat (limited to 'Software/Visual_Studio/Tango.CodeGeneration/Templates')
| -rw-r--r-- | Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoEnumFile.cshtml | 23 | ||||
| -rw-r--r-- | Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoMessageFile.cshtml | 24 |
2 files changed, 47 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoEnumFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoEnumFile.cshtml new file mode 100644 index 000000000..790e5dd93 --- /dev/null +++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoEnumFile.cshtml @@ -0,0 +1,23 @@ +syntax = "proto3"; + +//This file is auto-generated. Do not modify! + +@foreach (var import in Model.Imports) +{ + <div> + import "@(import)"; + </div> +} + +package @(Model.Package); +option java_package = "com.twine.@(Model.Package.ToLower())"; + +enum @(Model.Name) +{ + @foreach (var prop in Model.Fields) + { + <div> + @(prop.Name) = @(prop.Value); + </div> + } +} diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoMessageFile.cshtml b/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoMessageFile.cshtml new file mode 100644 index 000000000..7452db6e6 --- /dev/null +++ b/Software/Visual_Studio/Tango.CodeGeneration/Templates/ProtoMessageFile.cshtml @@ -0,0 +1,24 @@ +syntax = "proto3"; + +//This file is auto-generated. Do not modify! + +@foreach (var import in Model.Imports) +{ + <div> + import "@(import)"; + </div> +} + +package @(Model.Package); +option java_package = "com.twine.@(Model.Package.ToLower())"; + +message @(Model.Name) +{ + +@for (int i = 0; i < Model.Properties.Count; i++) +{ +<div> + @(Model.Properties[i].Type) @(Model.Properties[i].Name) = @(i + 1); +</div> +} +} |
