Beispiel #1
0
        static void Main(string[] args)
        {
            List <Elem> typesFiles = new  List <Elem>();
            Elem        el         = new Elem();

            el.type           = "class";
            el.name           = "A_class";
            el.begin          = 1;
            el.end            = 10;
            el.size           = 9;
            el.prog_complexit = 1;
            typesFiles.Add(el);
            List <relationelem> relFiles = new  List <relationelem>();
            relationelem        r_el     = new relationelem();

            r_el.a_class       = "A_class";
            r_el.b_class       = "B_class";
            r_el.isInheritance = true;
            r_el.isAggregation = false;
            r_el.isComposition = false;
            relFiles.Add(r_el)
            xml_class xml_obj = new xml_class();

            xml_obj.display(List <Elem> typesFiles, List <relationelem> relFiles);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            string            path        = null;
            List <string>     patterns    = new List <string>();
            List <string>     options     = null;
            FileMgr           fileManager = new FileMgr();
            CommandLineParser arguments   = new CommandLineParser();
            bool x_display = false;
            bool r_display = false;

            //****************fetches for the path,patterns and options given by the user***************//
            path     = arguments.processPath(args);
            patterns = arguments.processPattern(args);
            options  = arguments.processOptions(args);



            if ((options.Contains("/x")) || (options.Contains("/X"))) //Checks if the user wants the display in XML format
            {
                x_display = true;
            }
            if ((options.Contains("/s")) || (options.Contains("/S"))) //Checks if the user wants to search for the files in the sub directories
            {
                fileManager.recursion = true;
            }
            if ((options.Contains("/r")) || (options.Contains("/R"))) //Checks if the user wants to view the relationships
            {
                r_display = true;
            }
            Analyzer anal = new Analyzer();

            Display DispObj = new Display();

            string[] files = fileManager.getFiles(path, patterns); //returns all the files
            anal.doAnalysis(files);
            anal.reldoAnalysis(files);

            xml_class xml_obj = new xml_class();

            if ((r_display != true) && (x_display != true))
            {
                DispObj.DisplayReport(anal.typesBetweenFiles);
                DispObj.complete(anal.rel_BetweenFiles);
            }
            if (r_display)
            {
                DispObj.complete(anal.rel_BetweenFiles);
            }

            if (x_display)
            {
                xml_obj.display(anal.typesBetweenFiles, anal.rel_BetweenFiles);
            }
        }