User:Bugman/subsystems: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Added another script.)
m (→‎Script: Script update.)
Line 61: Line 61:
         # Add some problematic non-parsable classes.
         # Add some problematic non-parsable classes.
         if self.category_subsystems:
         if self.category_subsystems:
             self.subsystems[1].append(Subsystem("FGAISim", base_class=Subsystem("FGInterface", base_class=Subsystem("SGSubsystem")), declaration_file="src/FDM/SP/AISim.hpp", root_path=self.root_path("src/FDM/SP/AISim.hpp"), full_path=self.output_full_path, xml=self.output_xml))
             self.subsystems[1].append(Subsystem("FGAISim", base_class=Subsystem("FGInterface", base_class=Subsystem("SGSubsystem")), static_id="aisim", declaration_file="src/FDM/SP/AISim.hpp", root_path=self.root_path("src/FDM/SP/AISim.hpp"), full_path=self.output_full_path, xml=self.output_xml))


         # Find all SGSubsystem and SGSubsystemGroup derived classes.
         # Find all SGSubsystem and SGSubsystemGroup derived classes.
Line 635: Line 635:
     """Object for storing the information for a specific subsystem."""
     """Object for storing the information for a specific subsystem."""


     def __init__(self, name, base_class=None, declaration_file=None, implementation_file=None, root_path=None, full_path=False, xml=False):
     def __init__(self, name, base_class=None, static_id=None, declaration_file=None, implementation_file=None, root_path=None, full_path=False, xml=False):
         """Set up the object.
         """Set up the object.


Line 642: Line 642:
         @keyword base_class:            The name of the base class.
         @keyword base_class:            The name of the base class.
         @type base_class:              str
         @type base_class:              str
        @keyword static_id:            The value returned by staticSubsystemClassId().
        @type static_id:                str
         @keyword declaration_file:      The name of the file containing the subsystem declaration.
         @keyword declaration_file:      The name of the file containing the subsystem declaration.
         @type declaration_file:        str
         @type declaration_file:        str
Line 653: Line 655:
         @type xml:                      bool
         @type xml:                      bool
         """
         """
        # Initialisation.
        self.staticSubsystemClassId = None


         # Store the data.
         # Store the data.
         self.name = name
         self.name = name
         self.base_class = base_class
         self.base_class = base_class
        self.staticSubsystemClassId = static_id
         self.implementation_file = implementation_file
         self.implementation_file = implementation_file
         self.declaration_file = declaration_file
         self.declaration_file = declaration_file

Revision as of 13:08, 1 July 2019

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:

Automated test suite test creation

This script was used to generate the instanced and non-instanced subsystem system tests: