Changeset 4dbae73 in rtems-central


Ignore:
Timestamp:
May 10, 2020, 6:31:10 PM (6 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
05246b3
Parents:
3276ce2
git-author:
Sebastian Huber <sebastian.huber@…> (05/10/20 18:31:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/28/20 08:38:22)
Message:

interface: Add group-identifier

Location:
rtemsqual
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • rtemsqual/interface.py

    r3276ce2 r4dbae73  
    3737
    3838
    39 def _designator(name: str) -> str:
    40     return name.replace(" ", "")
    41 
    42 
    4339def _get_ingroups(item: Item) -> ItemMap:
    4440    ingroups = {}  # type: ItemMap
     
    4945
    5046
    51 def _ingroups_to_designators(ingroups: ItemMap) -> List[str]:
    52     return [_designator(item["group-name"]) for item in ingroups.values()]
     47def _get_group_identifiers(groups: ItemMap) -> List[str]:
     48    return [item["group-identifier"] for item in groups.values()]
    5349
    5450
     
    144140    content = CContent()
    145141    with content.doxygen_block():
    146         content.add_ingroup(_ingroups_to_designators(ingroups))
     142        content.add_ingroup(_get_group_identifiers(ingroups))
    147143        content.add_brief_description(item["interface-brief"])
    148144        content.add(content.wrap(item["interface-description"]))
     
    270266        for ingroup in self.ingroups.values():
    271267            self.header_file.add_potential_edge(self, ingroup)
    272         name = self.item["group-name"]
    273         self.content.add_group(_designator(name), name,
    274                                _ingroups_to_designators(self.ingroups),
     268        self.content.add_group(self.item["group-identifier"],
     269                               self.item["group-name"],
     270                               _get_group_identifiers(self.ingroups),
    275271                               self.item["group-brief"],
    276272                               self.item["group-description"])
     
    480476        self._content.add_spdx_license_identifier()
    481477        with self._content.file_block():
    482             self._content.add_ingroup(_ingroups_to_designators(self._ingroups))
     478            self._content.add_ingroup(_get_group_identifiers(self._ingroups))
    483479        self._content.add_copyrights_and_licenses()
    484480        with self._content.header_guard(self._item["interface-path"]):
  • rtemsqual/tests/spec-interface/ga.yml

    r3276ce2 r4dbae73  
    55group-brief: Group A brief description.
    66group-description: Group A description.
     7group-identifier: GroupA
    78group-name: Group A
    89interface-type: group
  • rtemsqual/tests/spec-interface/gb.yml

    r3276ce2 r4dbae73  
    55group-brief: null
    66group-description: null
     7group-identifier: GroupB
    78group-name: Group B
    89interface-type: group
  • rtemsqual/tests/spec-interface/gc.yml

    r3276ce2 r4dbae73  
    55group-brief: Group C brief description.
    66group-description: Group C description.
     7group-identifier: GroupC
    78group-name: Group C
    89interface-type: group
Note: See TracChangeset for help on using the changeset viewer.