Browse Source

Registrable: cleanup

pull/1808/head
Deadlocklogic 2 years ago
parent
commit
45d4043342
  1. 2
      src/Generator/Generators/Registrable/Lua/Sol/LuaSolGeneratorOptions.cs
  2. 6
      src/Generator/Generators/Registrable/RegistrableGeneratorOptions.cs
  3. 3
      src/Generator/Generators/Registrable/RegistrableNamingStrategy.cs

2
src/Generator/Generators/Registrable/Lua/Sol/LuaSolGeneratorOptions.cs

@ -4,7 +4,7 @@
{ {
public LuaSolNamingStrategy NamingStrategy; public LuaSolNamingStrategy NamingStrategy;
public LuaSolGeneratorOptions(LuaSolGenerator generator) : base() public LuaSolGeneratorOptions(LuaSolGenerator generator) : base(generator)
{ {
NamingStrategy = new LuaSolNamingStrategy(generator); NamingStrategy = new LuaSolNamingStrategy(generator);
} }

6
src/Generator/Generators/Registrable/RegistrableGeneratorOptions.cs

@ -13,7 +13,8 @@ namespace CppSharp.Generators.Registrable
{ {
public delegate string Delegate(string name); public delegate string Delegate(string name);
protected Generator generator; protected Generator Generator;
public virtual string OutputSubDir { get; } public virtual string OutputSubDir { get; }
public virtual string RootContextType { get; } public virtual string RootContextType { get; }
public virtual string RootContextName { get; } public virtual string RootContextName { get; }
@ -58,8 +59,9 @@ namespace CppSharp.Generators.Registrable
public virtual string DefaultStaticCastFunctionTemplateFullyQualifiedName => null; public virtual string DefaultStaticCastFunctionTemplateFullyQualifiedName => null;
public virtual string DefaultDynamicCastFunctionTemplateFullyQualifiedName => null; public virtual string DefaultDynamicCastFunctionTemplateFullyQualifiedName => null;
public RegistrableGeneratorOptions() public RegistrableGeneratorOptions(Generator generator)
{ {
Generator = generator;
OutputSubDir = DefaultOutputSubdir; OutputSubDir = DefaultOutputSubdir;
RootContextType = DefaultRootContextType; RootContextType = DefaultRootContextType;
RootContextName = DefaultRootContextName; RootContextName = DefaultRootContextName;

3
src/Generator/Generators/Registrable/RegistrableNamingStrategy.cs

@ -3,7 +3,6 @@ using CppSharp.Generators.C;
using CppSharp.Generators.Registrable.Lua.Sol; using CppSharp.Generators.Registrable.Lua.Sol;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Xml.Linq;
namespace CppSharp.Generators.Registrable namespace CppSharp.Generators.Registrable
{ {
@ -386,7 +385,7 @@ namespace CppSharp.Generators.Registrable
} }
} }
public string GetCppContext(Declaration entity, RegistrableGeneratorContext context, FQNOption option) public virtual string GetCppContext(Declaration entity, RegistrableGeneratorContext context, FQNOption option)
{ {
if (context != null) if (context != null)
{ {

Loading…
Cancel
Save