diff --git a/docs/conf.py b/docs/conf.py index 2a62013..9bdb8c0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -173,67 +173,4 @@ if read_the_docs_build: subprocess.call('doxygen Doxyfile', shell = True) breathe_projects = {"phyLS": "doxyxml/xml"} -breathe_default_project = "phyLS" - -# -- Custom directives ---------------------------------------------------- - -from docutils import nodes -from docutils.parsers.rst import Directive -from sphinx import addnodes - -def extract_brief(tree, name): - node = tree.findtext("./compounddef/sectiondef/memberdef/[name='%s']/briefdescription/para" % name) - return node.strip() if node else "no brief description" - -class DocBriefDirective(Directive): - has_content = True - - def run(self): - tree = self.state.document.settings.env.app.doxyxml - return [nodes.line(text = extract_brief(tree, self.content[0].strip()))] - -class DocBriefTableDirective(Directive): - has_content = True - - def run(self): - tree = self.state.document.settings.env.app.doxyxml - - table = nodes.table() - tgroup = nodes.tgroup(cols = 2) - - tgroup += nodes.colspec(colwidth = 50) - tgroup += nodes.colspec(colwidth = 50) - - # header - tgroup += nodes.thead('', nodes.row('', *[nodes.entry('', nodes.line(text = c)) for c in ["Function", "Description"]])) - - # rows - tbody = nodes.tbody() - for c in self.content: - name = c.strip() - query = name.replace("&", " &") - - for elem in tree.findall("./compounddef/sectiondef/memberdef/[name='%s']" % query): - args = ', '.join(e.text for e in elem.findall("./param/declname")) - - ref = addnodes.pending_xref('', refdomain = 'cpp', refexplicit = False, reftype = 'func', reftarget = 'phyLS::' + name) - ref += nodes.literal(text = '%s(%s)' % (name, args)) - - reft = nodes.paragraph() - reft.extend([ref]) - - func = nodes.entry('', reft) - desc = nodes.entry('', nodes.line(text = elem.findtext("./briefdescription/para"))) - - tbody += nodes.row('', func, desc) - - tgroup += tbody - table += tgroup - return [table] - -def setup(app): - import xml.etree.ElementTree as ET - app.doxyxml = ET.parse("doxyxml/xml/namespacephyLS.xml") - app.add_directive('doc_brief', DocBriefDirective) - app.add_directive('doc_brief_table', DocBriefTableDirective) - +breathe_default_project = "phyLS" \ No newline at end of file diff --git a/docs/load.rst b/docs/load.rst index 27607cf..39b959f 100644 --- a/docs/load.rst +++ b/docs/load.rst @@ -2,12 +2,4 @@ Load ============= The header ```` implements methods to load -a hexdecimal string represented truth table. - -.. doc_brief_table:: - is_top_decomposable - is_bottom_decomposable - is_ashenhurst_decomposable - ashenhurst_decomposition - is_bi_decomposable - is_bi_decomposable_mc +a hexdecimal string represented truth table. \ No newline at end of file