From 4b5bf60c0618e6b02f1d885417002e0e59796051 Mon Sep 17 00:00:00 2001 From: triton Date: Tue, 19 Mar 2013 13:52:02 +0000 Subject: [PATCH] Added preliminary support for methods in the C# generator. --- .../Generators/CSharp/CSharpTextTemplate.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 8cf3cdd2..d8716261 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -161,7 +161,10 @@ namespace Cxxi.Generators.CSharp WriteStartBraceIndent(); if (!@class.IsOpaque) + { GenerateClassFields(@class); + GenerateClassMethods(@class); + } WriteCloseBraceIndent(); } @@ -195,6 +198,17 @@ namespace Cxxi.Generators.CSharp } } + public void GenerateClassMethods(Class @class) + { + foreach (var method in @class.Methods) + GenerateClassMethod(method, @class); + } + + public void GenerateClassMethod(Method method, Class @class) + { + GenerateFunction(method); + } + #endregion public bool GenerateTypedef(TypedefDecl typedef)