Skip to content

Commit

Permalink
Use iteration over children to detect elements matching doxygen's dep…
Browse files Browse the repository at this point in the history
…recated tags.
  • Loading branch information
mesalu committed Feb 19, 2018
1 parent 929269e commit ddf2351
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions etgtools/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ def __init__(self, element=None, **kw):

def extract(self, element):
super(FunctionDef, self).extract(element)

# Check for deprecation
self.deprecated = bool([x for x in element.iter() if isinstance(x, et.Element) and x.get('id', "no_id_present").startswith('deprecated')])

self.type = flattenNode(element.find('type'))
self.definition = element.find('definition').text
self.argsString = element.find('argsstring').text
Expand Down Expand Up @@ -711,6 +715,9 @@ def extract(self, element):

self.nodeBases = self.findHierarchy(element, {}, [], False)

# Check for deprecation:
self.deprecated = bool([x for x in element.iter() if isinstance(x, et.Element) and x.get('id', "no_id_present").startswith('deprecated')])

for node in element.findall('basecompoundref'):
self.bases.append(node.text)
for node in element.findall('derivedcompoundref'):
Expand Down

0 comments on commit ddf2351

Please sign in to comment.