DoxygenItem
- class sphinx_doxysummary.xmltree.DoxygenItem(refid: str, name: str, kind: str)
Item read from Doxygen generated xml.
- name
Name of the item.
- Type:
str
- kind
Kind of the item.
- Type:
str
- refid
Reference ID of the item.
- Type:
str
- summary
Brief description of the item.
- Type:
str
- args
Arguments of a function in the form of a list of pairs (argtype, argname).
- Type:
List[Tuple[str, str]]
- return_type
Return type of the function.
- Type:
str
- overload
Wether function is overloaded by another function or not.
- Type:
bool
- __init__(refid: str, name: str, kind: str)
- Parameters:
refid (str) – Reference ID of the item within the xml document.
name (str) – Name of the item (full scope).
kind (str) – Kind of the item (one of the following values: class, struct, function, variable, enum, enumvalue, typedef, define, namespace, file).
- check_args(args: str) bool
Check if arguments of a prototype / declaration match the arguments of the item.
- Parameters:
args (str) – Arguments of the prototype / declaration in form of a string and enclosed in parentheses.
Examples
>>> d = DoxygenItem(refid, name, kind) >>> ... # set summary, args and return type >>> d.check_args('(char a, char b)') >>> d.check_args('(double *, int)')
- property has_summary: bool
Check if the item has a summary or not.
- set_args(args: List[Tuple[str, str]])
Set arguments of the item if the item is a function.
- Parameters:
args (List[Tuple[str, str]]) – Arguments of the function.
- Raises:
ValueError – When the item is not a function.
- set_return_type(return_type: str)
Set return type of the item if the item is a function.
- Parameters:
return_type (str) – Return type of the function.
- Raises:
ValueError – When the item is not a function.
- set_summary(summary: str)
Set summary of the item.
- Parameters:
summary (str) – Brief description of the item.