mirror of https://github.com/mono/CppSharp.git
2 changed files with 27 additions and 33 deletions
@ -1,25 +1,31 @@ |
|||||||
namespace CppSharp.Generators |
using System.Collections.Generic; |
||||||
|
using System.Text; |
||||||
|
|
||||||
|
namespace CppSharp.Generators |
||||||
{ |
{ |
||||||
public abstract class TextTemplate : TextGenerator |
public abstract class TextTemplate : TextGenerator |
||||||
{ |
{ |
||||||
private const uint DefaultIndent = 4; |
public Driver Driver { get; private set; } |
||||||
private const uint MaxIndent = 80; |
public DriverOptions Options { get; private set; } |
||||||
|
public Library Library { get; private set; } |
||||||
public Driver Driver { get; set; } |
public TranslationUnit TranslationUnit { get; private set; } |
||||||
public DriverOptions Options { get; set; } |
|
||||||
public Library Library { get; set; } |
|
||||||
public ILibrary Transform; |
|
||||||
public TranslationUnit TranslationUnit { get; set; } |
|
||||||
public abstract string FileExtension { get; } |
|
||||||
|
|
||||||
public abstract void Generate(); |
|
||||||
|
|
||||||
protected TextTemplate(Driver driver, TranslationUnit unit) |
protected TextTemplate(Driver driver, TranslationUnit unit) |
||||||
{ |
{ |
||||||
Driver = driver; |
Driver = driver; |
||||||
Options = driver.Options; |
Options = driver.Options; |
||||||
Library = driver.Library; |
Library = driver.Library; |
||||||
Transform = driver.Transform; |
|
||||||
TranslationUnit = unit; |
TranslationUnit = unit; |
||||||
} |
} |
||||||
|
|
||||||
|
public abstract string FileExtension { get; } |
||||||
|
|
||||||
|
public abstract void Generate(); |
||||||
|
|
||||||
|
public virtual string GenerateText() |
||||||
|
{ |
||||||
|
return base.ToString(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
} |
} |
Loading…
Reference in new issue