Browse Source

Code formatting fixes.

pull/492/head
triton 10 years ago
parent
commit
95c34277a3
  1. 19
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

19
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -99,7 +99,8 @@ namespace CppSharp.Generators.CSharp @@ -99,7 +99,8 @@ namespace CppSharp.Generators.CSharp
get { return "cs"; }
}
public CSharpTextTemplate(Driver driver, IEnumerable<TranslationUnit> units, CSharpTypePrinter typePrinter, CSharpExpressionPrinter expressionPrinter)
public CSharpTextTemplate(Driver driver, IEnumerable<TranslationUnit> units,
CSharpTypePrinter typePrinter, CSharpExpressionPrinter expressionPrinter)
: base(driver, units)
{
TypePrinter = typePrinter;
@ -500,8 +501,7 @@ namespace CppSharp.Generators.CSharp @@ -500,8 +501,7 @@ namespace CppSharp.Generators.CSharp
GenerateClassInternalHead(@class);
WriteStartBraceIndent();
var typePrinter = TypePrinter;
typePrinter.PushContext(CSharpTypePrinterContextKind.Native);
TypePrinter.PushContext(CSharpTypePrinterContextKind.Native);
GenerateClassFields(@class, GenerateClassInternalsField, true);
if (@class.IsGenerated)
@ -512,18 +512,17 @@ namespace CppSharp.Generators.CSharp @@ -512,18 +512,17 @@ namespace CppSharp.Generators.CSharp
var functions = GatherClassInternalFunctions(@class);
foreach (var function in functions)
{
GenerateInternalFunction(function);
}
}
typePrinter.PopContext();
TypePrinter.PopContext();
WriteCloseBraceIndent();
PopBlock(NewLineKind.BeforeNextBlock);
}
private IEnumerable<Function> GatherClassInternalFunctions(Class @class, bool includeCtors = true)
private IEnumerable<Function> GatherClassInternalFunctions(Class @class,
bool includeCtors = true)
{
var functions = new List<Function>();
if (@class.IsValueType)
@ -780,7 +779,8 @@ namespace CppSharp.Generators.CSharp @@ -780,7 +779,8 @@ namespace CppSharp.Generators.CSharp
return Tuple.Create(library, decl.Mangled);
}
private void GeneratePropertySetter<T>(QualifiedType returnType, T decl, Class @class, bool isAbstract = false)
private void GeneratePropertySetter<T>(QualifiedType returnType, T decl,
Class @class, bool isAbstract = false)
where T : Declaration, ITypedDecl
{
if (!(decl is Function || decl is Field) )
@ -936,7 +936,8 @@ namespace CppSharp.Generators.CSharp @@ -936,7 +936,8 @@ namespace CppSharp.Generators.CSharp
}
}
private void GeneratePropertyGetter<T>(QualifiedType returnType, T decl, Class @class, bool isAbstract = false)
private void GeneratePropertyGetter<T>(QualifiedType returnType, T decl,
Class @class, bool isAbstract = false)
where T : Declaration, ITypedDecl
{
PushBlock(CSharpBlockKind.Method);

Loading…
Cancel
Save