Bind.JavaSpecWriter.WriteBindings C# (CSharp) Method

WriteBindings() private method

private WriteBindings ( DelegateCollection delegates, FunctionCollection wrappers, EnumCollection enums ) : void
delegates DelegateCollection
wrappers FunctionCollection
enums EnumCollection
return void
        void WriteBindings(DelegateCollection delegates, FunctionCollection wrappers, EnumCollection enums)
        {
            Console.WriteLine("Writing bindings to {0}", Settings.OutputPath);
            if (!Directory.Exists(Settings.OutputPath))
                Directory.CreateDirectory(Settings.OutputPath);

            // Hack: Fix 3dfx extension category so it doesn't start with a digit
            if (wrappers.ContainsKey("3dfx"))
            {
                var three_dee_fx = wrappers["3dfx"];
                wrappers.Remove("3dfx");
                wrappers.Add(DigitPrefix + "3dfx", three_dee_fx);
            }

            using (var sw = sw_h)
            {
                WriteLicense(sw);

                sw.WriteLine("package {0}.{1};", Settings.OutputNamespace, Settings.GLClass);
                sw.WriteLine();
                sw.WriteLine("import java.nio.*;");
                sw.WriteLine();

                WriteDefinitions(sw, enums, wrappers, Type.CSTypes);

                sw.Flush();
                sw.Close();
            }

            string output_header = Path.Combine(Settings.OutputPath, OutputFileHeader);
            Move(sw_h.File, output_header);
        }

Same methods

JavaSpecWriter::WriteBindings ( IBind generator ) : void