Browse Source

Document and organize a few more options.

pull/750/head
Joao Matos 9 years ago
parent
commit
c8f8d016b0
  1. 34
      src/Generator/Options.cs

34
src/Generator/Options.cs

@ -42,12 +42,24 @@ namespace CppSharp
/// <summary> /// <summary>
/// Set to true to simulate generating without actually writing /// Set to true to simulate generating without actually writing
/// any output to disk. This can be useful to activate while /// any output to disk.
/// debugging the parser generator so generator bugs do not get
/// in the way while iterating.
/// </summary> /// </summary>
public bool DryRun; public bool DryRun;
/// <summary>
/// Whether the generated code should be automatically compiled.
/// </summary>
public bool CompileCode;
// Parser options
/// <summary>
/// If this option is off (the default), each header is parsed separately
/// which is much slower but safer because of a clean state of the preprocessor
/// for each header.
/// </summary>
public bool UnityBuild { get; set; }
public Module SystemModule { get; } public Module SystemModule { get; }
public List<Module> Modules { get; } public List<Module> Modules { get; }
@ -61,7 +73,6 @@ namespace CppSharp
} }
} }
// Parser options
public List<string> Headers => MainModule.Headers; public List<string> Headers => MainModule.Headers;
// Library options // Library options
@ -104,31 +115,20 @@ namespace CppSharp
/// <summary> /// <summary>
/// If set to true the CLI generator will use ObjectOverridesPass to create /// If set to true the CLI generator will use ObjectOverridesPass to create
/// Equals, GetHashCode and (if the insertion operator &lt;&lt; is overloaded) ToString /// Equals, GetHashCode and (if the insertion operator &lt;&lt; is overloaded)
/// methods. /// ToString methods.
/// </summary> /// </summary>
public bool GenerateObjectOverrides; public bool GenerateObjectOverrides;
//List of include directories that are used but not generated //List of include directories that are used but not generated
public List<string> NoGenIncludeDirs; public List<string> NoGenIncludeDirs;
/// <summary>
/// Whether the generated C# code should be automatically compiled.
/// </summary>
public bool CompileCode;
/// <summary> /// <summary>
/// Enable this option to enable generation of finalizers. /// Enable this option to enable generation of finalizers.
/// Works in both CLI and C# backends. /// Works in both CLI and C# backends.
/// </summary> /// </summary>
public bool GenerateFinalizers; public bool GenerateFinalizers;
/// <summary>
/// If this option is off (the default), each header is parsed separately which is much slower
/// but safer because of a clean state of the preprocessor for each header.
/// </summary>
public bool UnityBuild { get; set; }
public string IncludePrefix; public string IncludePrefix;
public Func<TranslationUnit, string> GenerateName; public Func<TranslationUnit, string> GenerateName;
public string CommentPrefix; public string CommentPrefix;

Loading…
Cancel
Save