This module is used to scrape the all of the APIs from a given source file and return their name and kind. These include classes, structs, functions, and certain variable types. It is not used to actually describe these elements. That is the job of the autodescriber.
This module is available as an xdress plugin by the name xdress.autoall.
Including this plugin enables the classes, functions, and variables run control parameters to have an asterix (‘*’) in the name positon (index 0). For example, rather than writing:
classes = [
('People', 'people'),
('JoanOfArc', 'people'),
('JEdgaHoover', 'people'),
('Leslie', 'people'),
('HuaMulan', 'people'),
]
we can instead simply write:
classes = [('*', 'people')]
Isn’t this grand?!
author: | Anthony Scopatz <scopatz@gmail.com> |
---|
A quick persistent cache for name lists automatically found in files. The keys are (classname, filename, kind) tuples. The values are (hashes-of-the-file, finder-results) tuples.
Parameters : | cachefile : str, optional
|
---|
Class used for discovering APIs using an etree representation of the GCC-XML AST.
Parameters : | root : element tree node, optional
onlyin : str, optional
verbose : bool, optional
|
---|
Visits the node and all sub-nodes, filling the API names as it goes.
Parameters : | node : element tree node, optional
|
---|
Visits the node and all sub-nodes, finding instances of the kinds and recording the names as it goes.
Parameters : | node : element tree node
kinds : str or sequence of str
|
---|---|
Returns : | names : list of str
|
Class used for discovering APIs using the pycparser AST.
Parameters : | root : element tree node, optional
onlyin : str, optional
verbose : bool, optional
|
---|
This plugin resolves the ‘*’ syntax in wrapper types by parsing the source files prio to describing them.
The __init__() method may take no arguments or keyword arguments.
Automatically finds all API elements in a file via clang.
Parameters : | filename : str
includes : list of str, optional
defines : list of str, optional
undefines : list of str, optional
extra_parser_args : list of str, optional
language : str
verbose : Ignored debug : Ignored builddir : Ignored clang_includes : list of str, optional
|
---|---|
Returns : | variables : list of strings
functions : list of strings
classes : list of strings
|
Automatically finds all API elements in a file. This is the main entry point.
Parameters : | filename : str
includes: list of str, optional :
defines: list of str, optional :
undefines: list of str, optional :
extra_parser_args : list of str, optional
parsers : str, list, or dict, optional
verbose : bool, optional
debug : bool, optional
builddir : str, optional
language : str
clang_includes : list of str, optional
|
---|---|
Returns : | variables : list of strings
functions : list of strings
classes : list of strings
|
Automatically finds all API elements in a file via GCC-XML.
Parameters : | filename : str
includes : list of str, optional
defines : list of str, optional
undefines : list of str, optional
extra_parser_args : list of str, optional
verbose : bool, optional
debug : bool, optional
builddir : str, optional
language : str
clang_includes : ignored |
---|---|
Returns : | variables : list of strings
functions : list of strings
classes : list of strings
|
Automatically finds all API elements in a file via GCC-XML.
Parameters : | filename : str
includes : list of str, optional
defines : list of str, optional
undefines : list of str, optional
extra_parser_args : list of str, optional
verbose : bool, optional
debug : bool, optional
builddir : str, optional
language : str
clang_includes : ignored |
---|---|
Returns : | variables : list of strings
functions : list of strings
classes : list of strings
|