Ticket #780: doxygen_namemangling.patch
| File doxygen_namemangling.patch, 2.3 kB (added by Giel van Schijndel <me@mortis.eu>, 6 months ago) |
|---|
-
0.10/doxygentrac/doxygentrac.py
old new 68 68 encoding = Option('doxygen', 'encoding', 'iso-8859-1', 69 69 """Default encoding used by the generated documentation files.""") 70 70 71 default_namespace = Option('doxygen', 'default_namespace', '', 72 """Default namespace to search for named objects in.""") 73 71 74 SUMMARY_PAGES = """ 72 75 annotated classes dirs files functions globals hierarchy 73 76 index inherits main namespaces namespacemembers … … 318 321 # - do something about dirs 319 322 # - expand with enum, defs, etc. 320 323 # - this doesn't work well with the CREATE_SUBDIRS Doxygen option 321 path, link = lookup('class%s.html' % file, 'class') 324 325 # do doxygen-style name->file mapping 326 # this is a little different than doxygen, but I don't see another way 327 # way to make doxygen:Type<bool> links work, as it inserts a ' ' (or 328 # '_01') after/before the type name. 329 charmap = { '_':'__', ':':'_1', '/':'_2', '<':'_3_01', '>':'_01_4', \ 330 '*':'_5', '&':'_6', '|':'_7', '.':'_8', '!':'_9', \ 331 ',':'_00',' ':'_01' } 332 mangledfile = '' 333 for i in file: 334 if i in charmap.keys(): 335 mangledfile += charmap[i] 336 else: 337 mangledfile += i 338 339 path, link = lookup('class%s.html' % mangledfile, 'class') 322 340 if not path: 323 path, link = lookup('struct%s.html' % file, 'struct')341 path, link = lookup('struct%s.html' % mangledfile, 'struct') 324 342 if path: 325 343 return 'view', path, link 326 344 345 # Try in the default_namespace 346 if self.default_namespace != "": 347 mangledfile = self.default_namespace + '_1_1' + mangledfile 348 path, link = lookup('class%s.html' % mangledfile, 'class') 349 if not path: 350 path, link = lookup('struct%s.html' % mangledfile, 'struct') 351 if path: 352 return 'view', path, link 353 354 327 355 # Revert to search... 328 356 results = self._search_in_documentation(doc, [file]) 329 357 class_ref = file+' Class Reference'
