Пример #1
0
 private static void CheckCompoundManager()
 {
     if (mCompoundManager == null)
     {
         ConsoleUtility.WriteLine("Initialise compound manager");
         mCompoundManager = new CompoundManager();
         mCompoundManager.SetIgnoredNameList(new string[] { "MyGUI::Allocator", "MyGUI::Allocator::rebind" });
         mCompoundManager.Initialise(@"..\..\..\doxygen\xml");
     }
 }
Пример #2
0
        private static void Main(string[] _args)
        {
            DirectoryInfo dataFolder = new DirectoryInfo(@"..\..\..\Data");
            if (!dataFolder.Exists)
            {
                ConsoleUtility.WriteErrorLine("Folder {0} is not exist", dataFolder.FullName);
                return;
            }

            while (true)
            {
                PrintInfo(dataFolder);

                ConsoleKeyInfo key = Console.ReadKey();
                Console.WriteLine();

                if (key.Key == ConsoleKey.Escape)
                {
                    break;
                }
                else if (key.Key == ConsoleKey.D1)
                {
                    // будет невалидным
                    mCompoundManager = null;

                    ProcessStartInfo info = new ProcessStartInfo();
                    info.FileName = "doxygen.exe";
                    info.WorkingDirectory = @"..\..\..\doxygen";

                    Process doxygen = Process.Start(info);
                    doxygen.WaitForExit();
                }
                else if (key.Key == ConsoleKey.D2)
                {
                    CheckCompoundManager();

                    string fileName = "CompoundTree.xml";
                    mCompoundManager.DumpCompoundTree(fileName);

                    ConsoleUtility.WriteLine("Dump saved to {0}", fileName);
                }
                else
                {
                    int offset = (int)key.Key - (int)ConsoleKey.D3;
                    string fileName = GetFileByOffset(offset, dataFolder);
                    if (fileName != "")
                    {
                        CheckCompoundManager();

                        ConsoleUtility.WriteLine("Generate for {0}", fileName);

                        WrapperManager wrapperManager = new WrapperManager();
                        string file = Path.Combine(dataFolder.FullName, fileName);
                        wrapperManager.Initialise(file);

                        ConsoleUtility.WriteLine("Generate complite");
                    }
                    else
                    {
                        ConsoleUtility.WriteErrorLine("Error file found");
                    }
                }

                Console.WriteLine();
            }
        }
Пример #3
0
        public CompoundManager()
        {
            mInstance = this;

            RegisterFactories();
        }