aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual Studio/Tango.Protobuf/Compilers/CCompiler.cs
blob: 18aab84c618b9e2080d0f523fb7ca5dbb0fa0da4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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";
        }
    }
}