예제 #1
0
        public InterfaceTransform(
            NamingRulesManager namingRules,
            Logger logger,
            GlobalNamespaceProvider globalNamespace,
            ITransformPreparer <CppMethod, CsMethod> methodPreparer,
            ITransformer <CsMethod> methodTransformer,
            TypeRegistry typeRegistry,
            NamespaceRegistry namespaceRegistry)
            : base(namingRules, logger)
        {
            MethodPreparer         = methodPreparer;
            MethodTransformer      = methodTransformer;
            this.typeRegistry      = typeRegistry;
            this.namespaceRegistry = namespaceRegistry;
            propertyBuilder        = new PropertyBuilder(globalNamespace);
            methodOverloadBuilder  = new MethodOverloadBuilder(globalNamespace, typeRegistry);

            CppObjectType = new CsInterface {
                Name = globalNamespace.GetTypeName(WellKnownName.CppObject)
            };
            DefaultCallbackable = new CsInterface
            {
                Name       = globalNamespace.GetTypeName(WellKnownName.ICallbackable),
                ShadowName = globalNamespace.GetTypeName(WellKnownName.CppObjectShadow),
                VtblName   = globalNamespace.GetTypeName(WellKnownName.CppObjectVtbl)
            };
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TransformManager"/> class.
        /// </summary>
        public TransformManager(
            GlobalNamespaceProvider globalNamespace,
            NamingRulesManager namingRules,
            Logger logger,
            TypeRegistry typeRegistry,
            IDocumentationLinker docLinker,
            ConstantManager constantManager,
            AssemblyManager assemblyManager)
        {
            GlobalNamespace          = globalNamespace;
            Logger                   = logger;
            NamingRules              = namingRules;
            this.docLinker           = docLinker;
            this.typeRegistry        = typeRegistry;
            this.constantManager     = constantManager;
            this.assemblyManager     = assemblyManager;
            namespaceRegistry        = new NamespaceRegistry(logger, assemblyManager);
            marshalledElementFactory = new MarshalledElementFactory(Logger, GlobalNamespace, typeRegistry);

            EnumTransform = new EnumTransform(namingRules, logger, namespaceRegistry, typeRegistry);

            StructTransform = new StructTransform(namingRules, logger, namespaceRegistry, typeRegistry, marshalledElementFactory);

            FunctionTransform = new MethodTransform(namingRules, logger, groupRegistry, marshalledElementFactory, globalNamespace, typeRegistry);

            InterfaceTransform = new InterfaceTransform(namingRules, logger, globalNamespace, FunctionTransform, FunctionTransform, typeRegistry, namespaceRegistry);
        }
예제 #3
0
 public StructTransform(NamingRulesManager namingRules,
                        NamespaceRegistry namespaceRegistry,
                        MarshalledElementFactory factory,
                        Ioc ioc) : base(namingRules, ioc)
 {
     this.namespaceRegistry           = namespaceRegistry;
     this.factory                     = factory;
     factory.RequestStructProcessing += Process;
 }
예제 #4
0
 public EnumTransform(
     NamingRulesManager namingRules,
     Logger logger,
     NamespaceRegistry namespaceRegistry,
     TypeRegistry typeRegistry)
     : base(namingRules, logger)
 {
     this.namespaceRegistry = namespaceRegistry;
     this.typeRegistry      = typeRegistry;
 }
예제 #5
0
 public MethodTransform(NamingRulesManager namingRules,
                        GroupRegistry groupRegistry,
                        MarshalledElementFactory factory,
                        IInteropSignatureTransform interopSignatureTransform,
                        Ioc ioc) : base(namingRules, ioc)
 {
     this.groupRegistry = groupRegistry;
     this.factory       = factory;
     signatureTransform = interopSignatureTransform;
 }
예제 #6
0
 public StructTransform(
     NamingRulesManager namingRules,
     Logger logger,
     NamespaceRegistry namespaceRegistry,
     TypeRegistry typeRegistry,
     MarshalledElementFactory factory)
     : base(namingRules, logger)
 {
     this.namespaceRegistry           = namespaceRegistry;
     this.typeRegistry                = typeRegistry;
     this.factory                     = factory;
     factory.RequestStructProcessing += Process;
 }
예제 #7
0
 public MethodTransform(NamingRulesManager namingRules,
                        Logger logger,
                        GroupRegistry groupRegistry,
                        MarshalledElementFactory factory,
                        GlobalNamespaceProvider globalNamespace,
                        IInteropSignatureTransform interopSignatureTransform)
     : base(namingRules, logger)
 {
     this.groupRegistry   = groupRegistry;
     this.factory         = factory;
     this.globalNamespace = globalNamespace;
     signatureTransform   = interopSignatureTransform;
 }
예제 #8
0
 public MethodTransform(
     NamingRulesManager namingRules,
     Logger logger,
     GroupRegistry groupRegistry,
     MarshalledElementFactory factory,
     GlobalNamespaceProvider globalNamespace,
     TypeRegistry typeRegistry)
     : base(namingRules, logger)
 {
     this.groupRegistry   = groupRegistry;
     this.factory         = factory;
     this.globalNamespace = globalNamespace;
     this.typeRegistry    = typeRegistry;
 }
예제 #9
0
 protected TransformBase(NamingRulesManager namingRules, Logger logger)
 {
     NamingRules = namingRules;
     Logger      = logger;
 }
예제 #10
0
 public ConstantManager(NamingRulesManager namingRules, IDocumentationLinker linker)
 {
     NamingRules         = namingRules;
     DocumentationLinker = linker;
 }
예제 #11
0
 protected TransformBase(NamingRulesManager namingRules, Ioc ioc)
 {
     NamingRules = namingRules;
     Ioc         = ioc ?? throw new ArgumentNullException(nameof(ioc));
 }
예제 #12
0
 public EnumTransform(NamingRulesManager namingRules, NamespaceRegistry namespaceRegistry,
                      Ioc ioc) : base(namingRules, ioc)
 {
     this.namespaceRegistry = namespaceRegistry;
 }