]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
doxy: also consider ctor/dtor
authordberzano <dario.berzano@cern.ch>
Mon, 8 Dec 2014 17:29:53 +0000 (18:29 +0100)
committerdberzano <dario.berzano@cern.ch>
Fri, 9 Jan 2015 15:01:06 +0000 (16:01 +0100)
doxygen/thtml2doxy_clang.py

index 39faa4ed259b8dd31a509bd060f51737e67a565b..e55a6449181450df69e4befa29aeec018105706c 100755 (executable)
@@ -178,15 +178,15 @@ def traverse_ast(cursor, comments, recursion=0):
   for i in range(0, recursion):
     indent = indent + '  '
 
-  if cursor.kind == clang.cindex.CursorKind.CXX_METHOD:
+  if cursor.kind == clang.cindex.CursorKind.CXX_METHOD or cursor.kind == clang.cindex.CursorKind.CONSTRUCTOR or cursor.kind == clang.cindex.CursorKind.DESTRUCTOR:
 
     # cursor ran into a C++ method
-    logging.debug( "%s%s(%s)" % (indent, Colt(kind).magenta(), Colt(text).blue()) )
+    logging.debug( "%5d %s%s(%s)" % (cursor.extent.start.line, indent, Colt(kind).magenta(), Colt(text).blue()) )
     comment_method(cursor, comments)
 
   else:
 
-    logging.debug( "%s%s(%s)" % (indent, kind, text) )
+    logging.debug( "%5d %s%s(%s)" % (cursor.extent.start.line, indent, kind, text) )
 
   for child_cursor in cursor.get_children():
     traverse_ast(child_cursor, comments, recursion+1)