diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2017-11-16 13:38:56 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2017-11-16 13:38:56 +0200 |
| commit | 914f4db513477d9aff726546bac47545195a3e37 (patch) | |
| tree | d2ff190fd84b1dfaa03eec76563c431592ece7ff /Software/Visual_Studio/Tango.Protobuf/Compilers | |
| parent | 65d01ff549d80fbe13ff5e966df216c9f7c03653 (diff) | |
| download | Tango-914f4db513477d9aff726546bac47545195a3e37.tar.gz Tango-914f4db513477d9aff726546bac47545195a3e37.zip | |
Rename "Visual Studio" to "Visual_Studio"
Rename "External Repositories" to "External_Repositories".
Diffstat (limited to 'Software/Visual_Studio/Tango.Protobuf/Compilers')
5 files changed, 170 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs new file mode 100644 index 000000000..18aab84c6 --- /dev/null +++ b/Software/Visual_Studio/Tango.Protobuf/Compilers/CCompiler.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Protobuf.Compilers +{ + /// <summary> + /// Represents a protobuf C Compiler. + /// </summary> + /// <seealso cref="Tango.Protobuf.ProtoCompiler" /> + public class CCompiler : ProtoCompiler + { + /// <summary> + /// Gets the compiler language. + /// </summary> + public override CompilerLanguage Language => CompilerLanguage.C; + + /// <summary> + /// Gets the protobuf compiler CLI arguments (without input/output files!). + /// </summary> + /// <returns></returns> + protected override string GetProtoArguments() + { + return "--c_out"; + } + + /// <summary> + /// Gets the protobuf compiler CLI file name (override when using a compiler other than the default 'protoc.exe'). + /// </summary> + /// <returns></returns> + /// <remarks> + /// The compiler program must be located in the compilers folder. + /// </remarks> + protected override string GetProtoCompilerName() + { + return "protoc-c"; + } + } +} diff --git a/Software/Visual_Studio/Tango.Protobuf/Compilers/CSharpCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/Compilers/CSharpCompiler.cs new file mode 100644 index 000000000..682dda60c --- /dev/null +++ b/Software/Visual_Studio/Tango.Protobuf/Compilers/CSharpCompiler.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Protobuf.Compilers +{ + /// <summary> + /// Represents a protobuf C# Compiler. + /// </summary> + /// <seealso cref="Tango.Protobuf.ProtoCompiler" /> + public class CSharpCompiler : ProtoCompiler + { + /// <summary> + /// Gets the compiler language. + /// </summary> + public override CompilerLanguage Language => CompilerLanguage.CSharp; + + /// <summary> + /// Gets the protobuf compiler CLI arguments (without input/output files!). + /// </summary> + /// <returns></returns> + protected override string GetProtoArguments() + { + return "--csharp_out"; + } + } +} diff --git a/Software/Visual_Studio/Tango.Protobuf/Compilers/CppCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/Compilers/CppCompiler.cs new file mode 100644 index 000000000..e8ea998d5 --- /dev/null +++ b/Software/Visual_Studio/Tango.Protobuf/Compilers/CppCompiler.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Protobuf.Compilers +{ + /// <summary> + /// Represents a protobuf C# Compiler. + /// </summary> + /// <seealso cref="Tango.Protobuf.ProtoCompiler" /> + public class CppCompiler : ProtoCompiler + { + /// <summary> + /// Gets the compiler language. + /// </summary> + public override CompilerLanguage Language => CompilerLanguage.CPP; + + /// <summary> + /// Gets the protobuf compiler CLI arguments (without input/output files!). + /// </summary> + /// <returns></returns> + protected override string GetProtoArguments() + { + return "--cpp_out"; + } + + /// <summary> + /// Gets a value indicating whether this compiler uses the default folder structure when generating code. + /// </summary> + public override bool UsesDefaultStructure => true; + } +} diff --git a/Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs new file mode 100644 index 000000000..55f0cf77f --- /dev/null +++ b/Software/Visual_Studio/Tango.Protobuf/Compilers/JavaCompiler.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Helpers; +using Tango.Logging; + +namespace Tango.Protobuf.Compilers +{ + /// <summary> + /// Represents a protobuf Java Compiler. + /// </summary> + /// <seealso cref="Tango.Protobuf.ProtoCompiler" /> + public class JavaCompiler : ProtoCompiler + { + /// <summary> + /// Gets the compiler language. + /// </summary> + public override CompilerLanguage Language => CompilerLanguage.Java; + + /// <summary> + /// Gets the protobuf compiler CLI arguments (without input/output files!). + /// </summary> + /// <returns></returns> + protected override string GetProtoArguments() + { + return "--java_out"; + } + + /// <summary> + /// Gets a value indicating whether this compiler uses the default folder structure when generating code. + /// </summary> + public override bool UsesDefaultStructure => true; + } +} diff --git a/Software/Visual_Studio/Tango.Protobuf/Compilers/PythonCompiler.cs b/Software/Visual_Studio/Tango.Protobuf/Compilers/PythonCompiler.cs new file mode 100644 index 000000000..e3c3ebbd7 --- /dev/null +++ b/Software/Visual_Studio/Tango.Protobuf/Compilers/PythonCompiler.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Protobuf.Compilers +{ + /// <summary> + /// Represents a protobuf Python Compiler. + /// </summary> + /// <seealso cref="Tango.Protobuf.ProtoCompiler" /> + public class PythonCompiler : ProtoCompiler + { + /// <summary> + /// Gets the compiler language. + /// </summary> + public override CompilerLanguage Language => CompilerLanguage.Python; + + /// <summary> + /// Gets the protobuf compiler CLI arguments (without input/output files!). + /// </summary> + /// <returns></returns> + protected override string GetProtoArguments() + { + return "--python_out"; + } + } +} |
