mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
wrap options in a CS2JOption class that remembers if the option has been set since it was given its default value
(in preparation for supporting config file)
This commit is contained in:
parent
67f5662d77
commit
1bee5bb9ac
@ -9,142 +9,756 @@ using System.IO;
|
|||||||
|
|
||||||
namespace Twiglet.CS2J.Translator
|
namespace Twiglet.CS2J.Translator
|
||||||
{
|
{
|
||||||
|
public class CS2JOption<T>
|
||||||
|
{
|
||||||
|
private bool isDefault = true;
|
||||||
|
public bool IsDefault
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return isDefault;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private T optValue = default(T);
|
||||||
|
public T Value
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optValue;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optValue = value;
|
||||||
|
isDefault = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void setIfDefault(T newVal)
|
||||||
|
{
|
||||||
|
if (IsDefault)
|
||||||
|
{
|
||||||
|
Value = newVal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefault(T newVal)
|
||||||
|
{
|
||||||
|
optValue = newVal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class CS2JSettings
|
public class CS2JSettings
|
||||||
{
|
{
|
||||||
|
|
||||||
public bool DisplayTokens { get; set; }
|
// DisplayTokens
|
||||||
|
private CS2JOption<bool> optDisplayTokens = new CS2JOption<bool>();
|
||||||
// dump parse trees to stdout
|
public CS2JOption<bool> OptDisplayTokens {
|
||||||
public bool DumpCSharp { get; set; }
|
get
|
||||||
public bool DumpJavaSyntax { get; set; }
|
{
|
||||||
public bool DumpJava { get; set; }
|
return optDisplayTokens;
|
||||||
|
}
|
||||||
public bool DumpXmls { get; set; }
|
}
|
||||||
public bool DumpEnums { get; set; }
|
public bool DisplayTokens {
|
||||||
public string OutDir { get; set; }
|
get
|
||||||
public string CheatDir { get; set; }
|
{
|
||||||
public IList<string> NetRoot { get; set; }
|
return optDisplayTokens.Value;
|
||||||
public IList<string> ExNetRoot { get; set; }
|
}
|
||||||
public IList<string> NetSchemaDir { get; set; }
|
set
|
||||||
public IList<string> AppRoot { get; set; }
|
{
|
||||||
public IList<string> ExAppRoot { get; set; }
|
optDisplayTokens.Value = value;
|
||||||
public IList<string> Exclude { get; set; }
|
}
|
||||||
public IList<string> MacroDefines { get; set; }
|
|
||||||
|
|
||||||
public IList<string> AltTranslations { get; set; }
|
|
||||||
|
|
||||||
public string XmlDir { get; set; }
|
|
||||||
public string EnumDir { get; set; }
|
|
||||||
public int Verbosity { get; set; }
|
|
||||||
|
|
||||||
public string KeyFile { get; set; }
|
|
||||||
|
|
||||||
public bool DebugTemplateExtraction { get; set; }
|
|
||||||
public int DebugLevel { get; set; }
|
|
||||||
|
|
||||||
public bool Warnings { get; set; }
|
|
||||||
public bool WarningsFailedResolves { get; set; }
|
|
||||||
|
|
||||||
public bool TranslatorKeepParens
|
|
||||||
{
|
|
||||||
get; set;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TranslatorAddTimeStamp
|
// DumpCSharp
|
||||||
{
|
private CS2JOption<bool> optDumpCSharp = new CS2JOption<bool>();
|
||||||
get; set;
|
public CS2JOption<bool> OptDumpCSharp {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDumpCSharp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool DumpCSharp {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDumpCSharp.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optDumpCSharp.Value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TranslatorExceptionIsThrowable
|
// DumpJavaSyntax
|
||||||
{
|
private CS2JOption<bool> optDumpJavaSyntax = new CS2JOption<bool>();
|
||||||
get; set;
|
public CS2JOption<bool> OptDumpJavaSyntax {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDumpJavaSyntax;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool DumpJavaSyntax {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDumpJavaSyntax.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optDumpJavaSyntax.Value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TranslatorBlanketThrow
|
// DumpJava
|
||||||
{
|
private CS2JOption<bool> optDumpJava = new CS2JOption<bool>();
|
||||||
get; set;
|
public CS2JOption<bool> OptDumpJava {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDumpJava;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool DumpJava {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDumpJava.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optDumpJava.Value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TranslatorMakeJavadocComments
|
// DumpXmls
|
||||||
{
|
private CS2JOption<bool> optDumpXmls = new CS2JOption<bool>();
|
||||||
get; set;
|
public CS2JOption<bool> OptDumpXmls {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDumpXmls;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool DumpXmls {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDumpXmls.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optDumpXmls.Value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TranslatorMakeJavaNamingConventions
|
// DumpEnums
|
||||||
{
|
private CS2JOption<bool> optDumpEnums = new CS2JOption<bool>();
|
||||||
get; set;
|
public CS2JOption<bool> OptDumpEnums {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDumpEnums;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool DumpEnums {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDumpEnums.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optDumpEnums.Value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool EnumsAsNumericConsts
|
// OutDir
|
||||||
{
|
private CS2JOption<string> optOutDir = new CS2JOption<string>();
|
||||||
get; set;
|
public CS2JOption<string> OptOutDir {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optOutDir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string OutDir {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optOutDir.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optOutDir.Value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool UnsignedNumbersToSigned
|
// CheatDir
|
||||||
{
|
private CS2JOption<string> optCheatDir = new CS2JOption<string>();
|
||||||
get; set;
|
public CS2JOption<string> OptCheatDir {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optCheatDir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string CheatDir {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optCheatDir.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optCheatDir.Value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool UnsignedNumbersToBiggerSignedNumbers
|
// NetRoot
|
||||||
{
|
private CS2JOption<IList<string>> optNetRoot = new CS2JOption<IList<string>>();
|
||||||
get; set;
|
public CS2JOption<IList<string>> OptNetRoot {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optNetRoot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public IList<string> NetRoot {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optNetRoot.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optNetRoot.Value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ExperimentalTransforms
|
// ExNetRoot
|
||||||
{
|
private CS2JOption<IList<string>> optExNetRoot = new CS2JOption<IList<string>>();
|
||||||
get; set;
|
public CS2JOption<IList<string>> OptExNetRoot {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optExNetRoot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public IList<string> ExNetRoot {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optExNetRoot.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optExNetRoot.Value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool InternalIsJavaish
|
// NetSchemaDir
|
||||||
{
|
private CS2JOption<IList<string>> optNetSchemaDir = new CS2JOption<IList<string>>();
|
||||||
get; set;
|
public CS2JOption<IList<string>> OptNetSchemaDir {
|
||||||
}
|
get
|
||||||
|
{
|
||||||
|
return optNetSchemaDir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public IList<string> NetSchemaDir {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optNetSchemaDir.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optNetSchemaDir.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// AppRoot
|
||||||
|
private CS2JOption<IList<string>> optAppRoot = new CS2JOption<IList<string>>();
|
||||||
|
public CS2JOption<IList<string>> OptAppRoot {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optAppRoot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public IList<string> AppRoot {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optAppRoot.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optAppRoot.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExAppRoot
|
||||||
|
private CS2JOption<IList<string>> optExAppRoot = new CS2JOption<IList<string>>();
|
||||||
|
public CS2JOption<IList<string>> OptExAppRoot {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optExAppRoot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public IList<string> ExAppRoot {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optExAppRoot.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optExAppRoot.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Exclude
|
||||||
|
private CS2JOption<IList<string>> optExclude = new CS2JOption<IList<string>>();
|
||||||
|
public CS2JOption<IList<string>> OptExclude {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optExclude;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public IList<string> Exclude {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optExclude.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optExclude.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MacroDefines
|
||||||
|
private CS2JOption<IList<string>> optMacroDefines = new CS2JOption<IList<string>>();
|
||||||
|
public CS2JOption<IList<string>> OptMacroDefines {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optMacroDefines;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public IList<string> MacroDefines {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optMacroDefines.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optMacroDefines.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// AltTranslations
|
||||||
|
private CS2JOption<IList<string>> optAltTranslations = new CS2JOption<IList<string>>();
|
||||||
|
public CS2JOption<IList<string>> OptAltTranslations {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optAltTranslations;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public IList<string> AltTranslations {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optAltTranslations.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optAltTranslations.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// XmlDir
|
||||||
|
private CS2JOption<string> optXmlDir = new CS2JOption<string>();
|
||||||
|
public CS2JOption<string> OptXmlDir {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optXmlDir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string XmlDir {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optXmlDir.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optXmlDir.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// EnumDir
|
||||||
|
private CS2JOption<string> optEnumDir = new CS2JOption<string>();
|
||||||
|
public CS2JOption<string> OptEnumDir {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optEnumDir;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string EnumDir {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optEnumDir.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optEnumDir.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Verbosity
|
||||||
|
private CS2JOption<int> optVerbosity = new CS2JOption<int>();
|
||||||
|
public CS2JOption<int> OptVerbosity {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optVerbosity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public int Verbosity {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optVerbosity.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optVerbosity.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// KeyFile
|
||||||
|
private CS2JOption<string> optKeyFile = new CS2JOption<string>();
|
||||||
|
public CS2JOption<string> OptKeyFile {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optKeyFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string KeyFile {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optKeyFile.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optKeyFile.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// DebugTemplateExtraction
|
||||||
|
private CS2JOption<bool> optDebugTemplateExtraction = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptDebugTemplateExtraction {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDebugTemplateExtraction;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool DebugTemplateExtraction {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDebugTemplateExtraction.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optDebugTemplateExtraction.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// DebugLevel
|
||||||
|
private CS2JOption<int> optDebugLevel = new CS2JOption<int>();
|
||||||
|
public CS2JOption<int> OptDebugLevel {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDebugLevel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public int DebugLevel {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optDebugLevel.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optDebugLevel.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Warnings
|
||||||
|
private CS2JOption<bool> optWarnings = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptWarnings {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optWarnings;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool Warnings {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optWarnings.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optWarnings.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WarningsFailedResolves
|
||||||
|
private CS2JOption<bool> optWarningsFailedResolves = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptWarningsFailedResolves {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optWarningsFailedResolves;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool WarningsFailedResolves {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optWarningsFailedResolves.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optWarningsFailedResolves.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TranslatorKeepParens
|
||||||
|
private CS2JOption<bool> optTranslatorKeepParens = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptTranslatorKeepParens {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorKeepParens;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool TranslatorKeepParens {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorKeepParens.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optTranslatorKeepParens.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TranslatorAddTimeStamp
|
||||||
|
private CS2JOption<bool> optTranslatorAddTimeStamp = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptTranslatorAddTimeStamp {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorAddTimeStamp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool TranslatorAddTimeStamp {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorAddTimeStamp.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optTranslatorAddTimeStamp.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TranslatorExceptionIsThrowable
|
||||||
|
private CS2JOption<bool> optTranslatorExceptionIsThrowable = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptTranslatorExceptionIsThrowable {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorExceptionIsThrowable;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool TranslatorExceptionIsThrowable {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorExceptionIsThrowable.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optTranslatorExceptionIsThrowable.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TranslatorBlanketThrow
|
||||||
|
private CS2JOption<bool> optTranslatorBlanketThrow = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptTranslatorBlanketThrow {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorBlanketThrow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool TranslatorBlanketThrow {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorBlanketThrow.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optTranslatorBlanketThrow.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TranslatorMakeJavadocComments
|
||||||
|
private CS2JOption<bool> optTranslatorMakeJavadocComments = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptTranslatorMakeJavadocComments {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorMakeJavadocComments;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool TranslatorMakeJavadocComments {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorMakeJavadocComments.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optTranslatorMakeJavadocComments.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TranslatorMakeJavaNamingConventions
|
||||||
|
private CS2JOption<bool> optTranslatorMakeJavaNamingConventions = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptTranslatorMakeJavaNamingConventions {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorMakeJavaNamingConventions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool TranslatorMakeJavaNamingConventions {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optTranslatorMakeJavaNamingConventions.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optTranslatorMakeJavaNamingConventions.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// EnumsAsNumericConsts
|
||||||
|
private CS2JOption<bool> optEnumsAsNumericConsts = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptEnumsAsNumericConsts {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optEnumsAsNumericConsts;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool EnumsAsNumericConsts {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optEnumsAsNumericConsts.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optEnumsAsNumericConsts.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnsignedNumbersToSigned
|
||||||
|
private CS2JOption<bool> optUnsignedNumbersToSigned = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptUnsignedNumbersToSigned {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optUnsignedNumbersToSigned;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool UnsignedNumbersToSigned {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optUnsignedNumbersToSigned.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optUnsignedNumbersToSigned.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnsignedNumbersToBiggerSignedNumbers
|
||||||
|
private CS2JOption<bool> optUnsignedNumbersToBiggerSignedNumbers = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptUnsignedNumbersToBiggerSignedNumbers {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optUnsignedNumbersToBiggerSignedNumbers;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool UnsignedNumbersToBiggerSignedNumbers {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optUnsignedNumbersToBiggerSignedNumbers.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optUnsignedNumbersToBiggerSignedNumbers.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExperimentalTransforms
|
||||||
|
private CS2JOption<bool> optExperimentalTransforms = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptExperimentalTransforms {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optExperimentalTransforms;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool ExperimentalTransforms {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optExperimentalTransforms.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optExperimentalTransforms.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// InternalIsJavaish
|
||||||
|
private CS2JOption<bool> optInternalIsJavaish = new CS2JOption<bool>();
|
||||||
|
public CS2JOption<bool> OptInternalIsJavaish {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optInternalIsJavaish;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool InternalIsJavaish {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return optInternalIsJavaish.Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
optInternalIsJavaish.Value = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public CS2JSettings ()
|
public CS2JSettings ()
|
||||||
{
|
{
|
||||||
|
|
||||||
DisplayTokens = false;
|
OptDisplayTokens.setDefault(false);
|
||||||
|
|
||||||
// dump parse trees to stdout
|
// dump parse trees to stdout
|
||||||
DumpCSharp = false;
|
OptDumpCSharp.setDefault(false);
|
||||||
DumpJavaSyntax = false;
|
OptDumpJavaSyntax.setDefault(false);
|
||||||
DumpJava = false;
|
OptDumpJava.setDefault(false);
|
||||||
|
|
||||||
DumpXmls = false;
|
OptDumpXmls.setDefault(false);
|
||||||
DumpEnums = false;
|
OptDumpEnums.setDefault(false);
|
||||||
OutDir = Directory.GetCurrentDirectory();
|
OptOutDir.setDefault(Directory.GetCurrentDirectory());
|
||||||
CheatDir = "";
|
OptCheatDir.setDefault("");
|
||||||
NetRoot = new List<string>();
|
OptNetRoot.setDefault(new List<string>());
|
||||||
ExNetRoot = new List<string>();
|
OptExNetRoot.setDefault(new List<string>());
|
||||||
NetSchemaDir = new List<string>();
|
OptNetSchemaDir.setDefault(new List<string>());
|
||||||
AppRoot = new List<string>();
|
OptAppRoot.setDefault(new List<string>());
|
||||||
ExAppRoot = new List<string>();
|
OptExAppRoot.setDefault(new List<string>());
|
||||||
Exclude = new List<string>();
|
OptExclude.setDefault(new List<string>());
|
||||||
MacroDefines = new List<string>();
|
OptMacroDefines.setDefault(new List<string>());
|
||||||
AltTranslations = new List<string>();
|
OptAltTranslations.setDefault(new List<string>());
|
||||||
XmlDir = Path.Combine(Directory.GetCurrentDirectory(), "tmpXMLs");
|
OptXmlDir.setDefault(Path.Combine(Directory.GetCurrentDirectory(), "tmpXMLs"));
|
||||||
EnumDir = Path.Combine(Directory.GetCurrentDirectory(), "enums");
|
OptEnumDir.setDefault(Path.Combine(Directory.GetCurrentDirectory(), "enums"));
|
||||||
KeyFile = null;
|
OptKeyFile.setDefault(null);
|
||||||
Verbosity = 0;
|
OptVerbosity.setDefault(0);
|
||||||
DebugTemplateExtraction = true;
|
OptDebugTemplateExtraction.setDefault(true);
|
||||||
DebugLevel = 1;
|
OptDebugLevel.setDefault(1);
|
||||||
Warnings = true;
|
OptWarnings.setDefault(true);
|
||||||
WarningsFailedResolves = false;
|
OptWarningsFailedResolves.setDefault(false);
|
||||||
|
|
||||||
TranslatorKeepParens = true;
|
OptTranslatorKeepParens.setDefault(true);
|
||||||
TranslatorAddTimeStamp = true;
|
OptTranslatorAddTimeStamp.setDefault(true);
|
||||||
TranslatorExceptionIsThrowable = false;
|
OptTranslatorExceptionIsThrowable.setDefault(false);
|
||||||
TranslatorBlanketThrow = true;
|
OptTranslatorBlanketThrow.setDefault(true);
|
||||||
TranslatorMakeJavadocComments = true;
|
OptTranslatorMakeJavadocComments.setDefault(true);
|
||||||
TranslatorMakeJavaNamingConventions = true;
|
OptTranslatorMakeJavaNamingConventions.setDefault(true);
|
||||||
|
|
||||||
EnumsAsNumericConsts = false;
|
OptEnumsAsNumericConsts.setDefault(false);
|
||||||
UnsignedNumbersToSigned = false;
|
OptUnsignedNumbersToSigned.setDefault(false);
|
||||||
UnsignedNumbersToBiggerSignedNumbers = false;
|
OptUnsignedNumbersToBiggerSignedNumbers.setDefault(false);
|
||||||
|
|
||||||
ExperimentalTransforms = false;
|
OptExperimentalTransforms.setDefault(false);
|
||||||
|
|
||||||
InternalIsJavaish = false;
|
OptInternalIsJavaish.setDefault(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user