User:Bugman/subsystems: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(→‎Script: Another bug fix.)
(→‎Script: Subsystem class names can now be output.)
Line 370: Line 370:
         group.add_argument("-d", "--declaration-files", default=False, action="store_true", help="List the files where subsystems and subsystem groups are declared.")
         group.add_argument("-d", "--declaration-files", default=False, action="store_true", help="List the files where subsystems and subsystem groups are declared.")
         group.add_argument("-i", "--implementation-files", default=False, action="store_true", help="List the files where subsystems and subsystem groups are implemented.")
         group.add_argument("-i", "--implementation-files", default=False, action="store_true", help="List the files where subsystems and subsystem groups are implemented.")
        group.add_argument("--classes", default=False, action="store_true", help="List all class names.")
         group.add_argument("-p", "--full-path", default=False, action="store_true", help="For file listings, include the SIMGEAR or FLIGHTGEAR absolute path.")
         group.add_argument("-p", "--full-path", default=False, action="store_true", help="For file listings, include the SIMGEAR or FLIGHTGEAR absolute path.")


Line 400: Line 401:
         elif args.files:
         elif args.files:
             self.output_format = "files"
             self.output_format = "files"
        elif args.classes:
            self.output_format = "classes"
         elif args.declaration_files:
         elif args.declaration_files:
             self.output_format = "declaration files"
             self.output_format = "declaration files"
Line 487: Line 490:
         """Print out a summary of all found subsystems and subsystem groups."""
         """Print out a summary of all found subsystems and subsystem groups."""


         # Basic file listings.
         # Basic file or class listings.
         if self.output_format in ["files", "declaration files", "implementation files"]:
         if self.output_format in ["files", "declaration files", "implementation files", "classes"]:
             # Concatenate the lists.
             # Concatenate the lists.
             subsystem_list = []
             subsystem_list = []
Line 516: Line 519:
                         else:
                         else:
                             print("%s" % subsystem.implementation_file)
                             print("%s" % subsystem.implementation_file)
                # Output the class name.
                if self.output_format == "classes":
                    print("%s" % subsystem.name)


             # Skip the rest of the function.
             # Skip the rest of the function.

Revision as of 13:16, 6 May 2018

Tracking down subsystems

Script

The following script is for finding all FlightGear dependencies:

All subsystems

The result is:

Refactoring

To check that all subsystems on a branch have been updated or refactored: