Autogenerate a single handle page in baseDir for an API handle type. - baseDir - base directory to emit page into - handleName - API handle name
(baseDir, handleName)
| 734 | |
| 735 | |
| 736 | def autoGenHandlePage(baseDir, handleName): |
| 737 | """Autogenerate a single handle page in baseDir for an API handle type. |
| 738 | |
| 739 | - baseDir - base directory to emit page into |
| 740 | - handleName - API handle name""" |
| 741 | # @@ Need to determine creation function & add handles/ include for the |
| 742 | # @@ interface in generator.py. |
| 743 | pageName = f'{baseDir}/{handleName}{conventions.file_suffix}' |
| 744 | fp = open(pageName, 'w', encoding='utf-8') |
| 745 | |
| 746 | # Add a dictionary entry for this page |
| 747 | global genDict |
| 748 | genDict[handleName] = None |
| 749 | logDiag('autoGenHandlePage:', pageName) |
| 750 | |
| 751 | # Short description |
| 752 | desc = f'{apiName} object handle' |
| 753 | |
| 754 | descText = ''.join(( |
| 755 | f'sname:{handleName}', |
| 756 | ' is an object handle type, referring to an object used\n', |
| 757 | f'by the {apiName} implementation. These handles are created or allocated\n', |
| 758 | f'by the @@ TBD @@ function, and used by other {apiName} structures\n', |
| 759 | 'and commands in the See Also section below.\n')) |
| 760 | |
| 761 | refPageHead(pageName=handleName, |
| 762 | pageDesc=desc, |
| 763 | pageAliases=set(), |
| 764 | specText=makeAPIInclude('handles', handleName), |
| 765 | fieldName=None, |
| 766 | fieldText=None, |
| 767 | descText=descText, |
| 768 | fp=fp) |
| 769 | refPageTail(pageName=handleName, |
| 770 | specType=pi.spec, |
| 771 | specAnchor=pi.anchor, |
| 772 | seeAlso=seeAlsoList(apiName=handleName), |
| 773 | fp=fp, |
| 774 | auto=True) |
| 775 | fp.close() |
| 776 | |
| 777 | |
| 778 | def genRef(specFile, baseDir, aliasFrom): |
nothing calls this directly
no test coverage detected