diff --git a/docs/gen_reference_doc.py b/docs/gen_reference_doc.py index c8b2eb7e9..293db4c01 100644 --- a/docs/gen_reference_doc.py +++ b/docs/gen_reference_doc.py @@ -50,6 +50,10 @@ category_mapping = { 'socket.hpp': 'Network', 'socket_io.hpp': 'Network', 'rss.hpp': 'RSS', + 'bitfield.hpp': 'Utility', + 'peer_id.hpp': 'Utility', + 'identify_client.hpp': 'Utility', + 'thread.hpp': 'Utility', } def categorize_symbol(name, filename): @@ -62,7 +66,7 @@ def categorize_symbol(name, filename): or name.endswith('error_code_enum'): return 'Error Codes' - return 'BitTorrent' + return 'Core' def html_sanitize(s): ret = '' @@ -206,7 +210,7 @@ def parse_class(lno, lines, filename): continue if looks_like_variable(l): - fields.append({ 'name': l, 'desc': context}) + fields.append({ 'signature': l, 'name': l.split(' ')[-1][0:-1], 'desc': context}) context = '' continue @@ -407,7 +411,7 @@ if dump: if len(c['fun']) > 0 and len(c['fields']) > 0: print '' for f in c['fields']: - print ' %s' % f['name'] + print ' %s' % f['signature'] if len(c['fields']) > 0 and len(c['enums']) > 0: print '' @@ -457,7 +461,7 @@ out.write('''

libtorrent reference documentation

-
''') +
''') def print_declared_in(out, o): out.write('

Declared in "%s"

' % (o['file'], html_sanitize(o['file']))) @@ -516,7 +520,7 @@ for cat in categories: if len(c['fun']) + len(c['enums']) > 0 and len(c['fields']): print >>out, '' for f in c['fields']: - print >>out, ' %s' % html_sanitize(f['name']) + print >>out, ' %s' % html_sanitize(f['signature']) out.write('};') @@ -535,6 +539,12 @@ for cat in categories: print >>out, '%s%s' % (html_sanitize(v['name']), html_sanitize(v['desc'])) print >>out, '' + for f in c['fields']: + if f['desc'] == '': continue + print >>out, '
%s
' % (html_sanitize(c['name'] + '::' + f['name']), html_sanitize(f['name'])) + print >>out, '
%s
' % html_sanitize(f['desc']) + + # TODO: merge overloaded functions for f in functions: print >>out, '

%s()

' % (html_sanitize(f['name']), html_sanitize(f['name'])) diff --git a/docs/style.css b/docs/style.css index e487a6f3c..578e63722 100644 --- a/docs/style.css +++ b/docs/style.css @@ -78,8 +78,6 @@ div.section div.section div.section { margin-bottom: 2em; } -h3 { text-transform: uppercase; } - div.section p, div.section ul, div.section dl { }