+ def _create_file_edge(self, fromfile, tofile, filenodes):
+ intramodule = \
+ (fromfile.module.get_top_level_module() == \
+ tofile.module.get_top_level_module())
+ is_legacy = _is_legacy_module(tofile.module)
+ if tofile.type not in ('publicheader', 'libheader', 'header'):
+ if intramodule:
+ link_type = 'intramodule'
+ elif is_legacy:
+ link_type = 'legacy'
+ else:
+ link_type = 'undocumented'
+ elif fromfile.type == 'test':
+ link_type = 'test'
+ elif fromfile.type in ('source', 'header', 'implheader') and \
+ not fromfile.is_installed():
+ if intramodule:
+ link_type = 'intramodule'
+ elif tofile.type == 'publicheader':
+ link_type = 'pubimpl'
+ elif tofile.type == 'libheader':
+ link_type = 'libimpl'
+ elif is_legacy:
+ link_type = 'legacy'
+ elif not tofile.is_documented():
+ link_type = 'legacy'
+ else:
+ raise ValueError('Unknown link type between {0} and {1}'
+ .format(fromfile.path, tofile.path))
+ elif fromfile.type == 'libheader':
+ link_type = 'library'
+ elif fromfile.type == 'publicheader' or fromfile.is_installed():
+ if tofile.type == 'publicheader' or tofile.doctype == 'public' or \
+ (tofile.is_installed() and not tofile.is_documented()):
+ link_type = 'public'
+ else:
+ link_type = 'undocumented'
+ else:
+ raise ValueError('Unknown link type between {0} and {1}'
+ .format(fromfile.path, tofile.path))
+ return Link(filenodes[fromfile], filenodes[tofile], link_type)
+
+ def _create_file_edges(self, fileobj, filenodes):