private CSharpConverter(CSharpConverterOptions options) { Options = options ?? throw new ArgumentNullException(nameof(options)); _mapCppToCSharp = new Dictionary <CppElement, CSharpElement>(CppElementReferenceEqualityComparer.Default); _cppElementsToDiscard = new HashSet <CppElement>(CppElementReferenceEqualityComparer.Default); _csTempWriter = new CodeWriter(new CodeWriterOptions(null)); Tags = new Dictionary <string, object>(); _currentContainers = new Stack <ICSharpContainer>(); _pipeline = new CSharpConverterPipeline(options); _pipeline.RegisterPlugins(this); }
public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { var cachedRules = GetCachedRules(converter); // Register to the pipeline only we have anything to process if (!cachedRules.IsEmpty) { if (cachedRules.MacroRules.Count > 0 || cachedRules.TypesToCompile.Count > 0) { pipeline.AfterPreprocessing.Add(AfterPreprocessing); } pipeline.ConvertBegin.Add(ProcessTypedefs); pipeline.Converting.Add(ProcessCppElementMappingRules); pipeline.Converted.Add(ProcessCSharpElementMappingRules); } }
public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.TypedefConverters.Add(ConvertTypedef); }
/// <inheritdoc /> public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.ClassConverters.Add(ConvertClass); }
public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.GetCSharpNameResolvers.Add(DefaultGetCSharpName); }
/// <inheritdoc /> public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.ParameterConverters.Add(ConvertParameter); }
public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.FieldConverters.Add(ConvertField); }
public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.FunctionTypeConverters.Add(ConvertAnonymousFunctionType); }
public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.GetCSharpContainerResolvers.Add(GetSharpContainer); }
/// <inheritdoc /> public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.FunctionConverters.Add(ConvertFunction); }
/// <inheritdoc /> public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.GetCSharpTypeResolvers.Add(GetCSharpType); }
/// <inheritdoc /> public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.CommentConverters.Add(ConvertComment); }
public void Register(CSharpConverter converter, CSharpConverterPipeline pipeline) { pipeline.Converted.Add(AddDefaultDllImport); }