Esempio n. 1
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);
        }
        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)
            };
        }
Esempio n. 3
0
 public StructTransform(NamingRulesManager namingRules,
                        NamespaceRegistry namespaceRegistry,
                        MarshalledElementFactory factory,
                        Ioc ioc) : base(namingRules, ioc)
 {
     this.namespaceRegistry           = namespaceRegistry;
     this.factory                     = factory;
     factory.RequestStructProcessing += Process;
 }
Esempio n. 4
0
 public EnumTransform(
     NamingRulesManager namingRules,
     Logger logger,
     NamespaceRegistry namespaceRegistry,
     TypeRegistry typeRegistry)
     : base(namingRules, logger)
 {
     this.namespaceRegistry = namespaceRegistry;
     this.typeRegistry      = typeRegistry;
 }
Esempio n. 5
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;
 }
Esempio n. 6
0
 public EnumTransform(NamingRulesManager namingRules, NamespaceRegistry namespaceRegistry,
                      Ioc ioc) : base(namingRules, ioc)
 {
     this.namespaceRegistry = namespaceRegistry;
 }