diff options
author | jcorgan | 2009-01-06 02:00:34 +0000 |
---|---|---|
committer | jcorgan | 2009-01-06 02:00:34 +0000 |
commit | 74f527a8840e91c420962f26bea0e9f299f4b514 (patch) | |
tree | acbfdb258c3ddbe0319c505ad925174b50d99373 /gnuradio-core | |
parent | 1fc72526b45810f5a22a08479657d96c47b3290f (diff) | |
download | gnuradio-74f527a8840e91c420962f26bea0e9f299f4b514.tar.gz gnuradio-74f527a8840e91c420962f26bea0e9f299f4b514.tar.bz2 gnuradio-74f527a8840e91c420962f26bea0e9f299f4b514.zip |
Update doxygen Python generation (Firas Abbas)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10195 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core')
-rw-r--r-- | gnuradio-core/doc/Doxyfile.in | 194 | ||||
-rwxr-xr-x | gnuradio-core/doc/other/doxypy.py | 192 | ||||
-rw-r--r-- | gnuradio-core/doc/other/group_defs.dox | 9 |
3 files changed, 247 insertions, 148 deletions
diff --git a/gnuradio-core/doc/Doxyfile.in b/gnuradio-core/doc/Doxyfile.in index d83e65d40..048c0806c 100644 --- a/gnuradio-core/doc/Doxyfile.in +++ b/gnuradio-core/doc/Doxyfile.in @@ -25,7 +25,7 @@ DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. -PROJECT_NAME = "GNU Radio @VERSION@" +PROJECT_NAME = "GNU Radio @VERSION@ API" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or @@ -91,7 +91,7 @@ ABBREVIATE_BRIEF = # Doxygen will generate a detailed section even if there is only a brief # description. -ALWAYS_DETAILED_SEC = NO +ALWAYS_DETAILED_SEC = YES # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those @@ -152,7 +152,7 @@ QT_AUTOBRIEF = NO # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. -MULTILINE_CPP_IS_BRIEF = NO +MULTILINE_CPP_IS_BRIEF = YES # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. @@ -199,7 +199,7 @@ OPTIMIZE_OUTPUT_FOR_C = NO # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. -OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_OUTPUT_JAVA = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to # include (a tag file for) the STL sources as input, then you should @@ -249,7 +249,7 @@ EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. -EXTRACT_STATIC = NO +EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. @@ -262,7 +262,7 @@ EXTRACT_LOCAL_CLASSES = YES # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. -EXTRACT_LOCAL_METHODS = NO +EXTRACT_LOCAL_METHODS = YES # If this flag is set to YES, the members of anonymous namespaces will be extracted # and appear in the documentation as a namespace called 'anonymous_namespace{file}', @@ -354,7 +354,7 @@ SORT_BRIEF_DOCS = NO # Note: This option applies only to the class list, not to the # alphabetical list. -SORT_BY_SCOPE_NAME = NO +SORT_BY_SCOPE_NAME = YES # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo @@ -424,7 +424,7 @@ FILE_VERSION_FILTER = # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. -QUIET = NO +QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank @@ -495,7 +495,8 @@ INPUT_ENCODING = UTF-8 FILE_PATTERNS = *.h \ *.dox \ - *.py + *.py \ + *.cc # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. @@ -510,17 +511,7 @@ RECURSIVE = YES # We split these by top_srcdir and top_builddir (this matters in a VPATH build) EXCLUDE = \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.cc \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_py_filter.py \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_py_general.cc \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_py_general.py \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.cc \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_py_gengen.py \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_py_io.cc \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_py_io.py \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.cc \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_py_runtime.py \ - @abs_top_builddir@/gnuradio-core/src/lib/swig/gnuradio_swig_python.py \ + @abs_top_builddir@/gnuradio-core/src/lib/swig \ @abs_top_builddir@/gr-atsc/src/lib/atsc.cc \ @abs_top_builddir@/gr-atsc/src/lib/atsc.py \ @abs_top_builddir@/gr-audio-oss/src/audio_oss.py \ @@ -536,58 +527,80 @@ EXCLUDE = \ @abs_top_builddir@/gr-usrp/src/usrp1.py \ @abs_top_builddir@/gr-video-sdl/src/video_sdl.py \ @abs_top_builddir@/usrp/host/swig \ - @abs_top_srcdir@/docs \ - @abs_top_srcdir@/dtools \ - @abs_top_srcdir@/gnuradio-core/doc/doxypy/doxypy.py \ - @abs_top_srcdir@/gnuradio-core/doc/xml \ - @abs_top_srcdir@/gnuradio-core/src/lib/bug_work_around_6.cc \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/assembly.h \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/generate_all.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/generate_gr_fir_XXX.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/generate_gr_fir_filter_XXX.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig_generic.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/generate_gr_fir_util.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/generate_gr_freq_xlating_fir_filter_XXX.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/generate_gr_interp_fir_filter_XXX.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/generate_gr_rational_resampler_base_XXX.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/generate_utils.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/filter/sse_debug.h \ - @abs_top_srcdir@/gnuradio-core/src/lib/gengen/generate_all.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/gengen/generate_common.py \ - @abs_top_srcdir@/gnuradio-core/src/lib/missing/bug_work_around_8.cc \ - @abs_top_srcdir@/gnuradio-core/src/lib/runtime/gr_error_handler.cc \ - @abs_top_srcdir@/gnuradio-core/src/python/bin \ - @abs_top_srcdir@/gnuradio-core/src/python/build_utils.py \ - @abs_top_srcdir@/gnuradio-core/src/python/build_utils_codes.py \ - @abs_top_srcdir@/gnuradio-core/src/python/gnuradio/gr/gr_threading.py \ - @abs_top_srcdir@/gnuradio-core/src/python/gnuradio/gr/gr_threading_23.py \ - @abs_top_srcdir@/gnuradio-core/src/python/gnuradio/gr/gr_threading_24.py \ - @abs_top_srcdir@/gnuradio-core/src/tests \ - @abs_top_srcdir@/gnuradio-core/src/utils \ - @abs_top_srcdir@/gr-atsc/src/lib/gen_encoder.py \ - @abs_top_srcdir@/gr-atsc/src/python \ - @abs_top_srcdir@/gr-howto-write-a-block \ - @abs_top_srcdir@/gr-qtgui \ - @abs_top_srcdir@/gr-sounder/src/python/usrp_sounder.py \ - @abs_top_srcdir@/gr-trellis/doc \ - @abs_top_srcdir@/gr-trellis/src/lib/generate_all.py \ - @abs_top_srcdir@/gr-trellis/src/lib/generate_trellis.py \ - @abs_top_srcdir@/usrp/doc \ - @abs_top_srcdir@/usrp/firmware \ - @abs_top_srcdir@/usrp/fpga \ - @abs_top_srcdir@/usrp/host/apps \ - @abs_top_srcdir@/usrp/host/apps-inband \ - @abs_top_srcdir@/usrp/host/lib/inband \ - @abs_top_srcdir@/usrp/host/lib/legacy/ad9862.h \ - @abs_top_srcdir@/usrp/host/lib/legacy/check_data.py \ - @abs_top_srcdir@/usrp/host/lib/legacy/circular_buffer.h \ - @abs_top_srcdir@/usrp/host/lib/legacy/circular_linked_list.h \ - @abs_top_srcdir@/usrp/host/lib/legacy/dump_data.py \ - @abs_top_srcdir@/usrp/host/lib/legacy/gen_usrp_dbid.py \ - @abs_top_srcdir@/usrp/host/lib/legacy/usrp_dbid.py \ - @abs_top_srcdir@/usrp/host/misc \ - @abs_top_srcdir@/usrp/host/swig + @abs_top_builddir@/docs \ + @abs_top_builddir@/dtools \ + @abs_top_builddir@/gnuradio-core/doc/other/doxypy.py \ + @abs_top_builddir@/gnuradio-core/doc/xml \ + @abs_top_builddir@/gnuradio-core/doc/xml-swig \ + @abs_top_builddir@/gnuradio-core/src/lib/bug_work_around_6.cc \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/assembly.h \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_all.py \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_XXX.py \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_filter_XXX.py \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig_generic.py \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_fir_util.py \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_freq_xlating_fir_filter_XXX.py \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_interp_fir_filter_XXX.py \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_gr_rational_resampler_base_XXX.py \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/generate_utils.py \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/sse_debug.h \ + @abs_top_builddir@/gnuradio-core/src/lib/gengen/generate_all.py \ + @abs_top_builddir@/gnuradio-core/src/lib/gengen/generate_common.py \ + @abs_top_builddir@/gnuradio-core/src/lib/missing/bug_work_around_8.cc \ + @abs_top_builddir@/gnuradio-core/src/lib/runtime/gr_error_handler.cc \ + @abs_top_builddir@/gnuradio-core/src/python/bin \ + @abs_top_builddir@/gnuradio-core/src/python/build_utils.py \ + @abs_top_builddir@/gnuradio-core/src/python/build_utils_codes.py \ + @abs_top_builddir@/gnuradio-core/src/python/gnuradio/gr/gr_threading.py \ + @abs_top_builddir@/gnuradio-core/src/python/gnuradio/gr/gr_threading_23.py \ + @abs_top_builddir@/gnuradio-core/src/python/gnuradio/gr/gr_threading_24.py \ + @abs_top_builddir@/gnuradio-core/src/tests \ + @abs_top_builddir@/gnuradio-core/src/utils \ + @abs_top_builddir@/gr-atsc/src/lib/gen_encoder.py \ + @abs_top_builddir@/gr-atsc/src/python \ + @abs_top_builddir@/gr-howto-write-a-block \ + @abs_top_builddir@/gr-qtgui \ + @abs_top_builddir@/gr-sounder/src/python/usrp_sounder.py \ + @abs_top_builddir@/gr-trellis/doc \ + @abs_top_builddir@/gr-trellis/src/lib/generate_all.py \ + @abs_top_builddir@/gr-trellis/src/lib/generate_trellis.py \ + @abs_top_builddir@/usrp/doc \ + @abs_top_builddir@/usrp/firmware \ + @abs_top_builddir@/usrp/fpga \ + @abs_top_builddir@/usrp/host/apps \ + @abs_top_builddir@/usrp/host/apps-inband \ + @abs_top_builddir@/usrp/host/lib/inband \ + @abs_top_builddir@/usrp/host/lib/legacy/ad9862.h \ + @abs_top_builddir@/usrp/host/lib/legacy/check_data.py \ + @abs_top_builddir@/usrp/host/lib/legacy/circular_buffer.h \ + @abs_top_builddir@/usrp/host/lib/legacy/circular_linked_list.h \ + @abs_top_builddir@/usrp/host/lib/legacy/dump_data.py \ + @abs_top_builddir@/usrp/host/lib/legacy/gen_usrp_dbid.py \ + @abs_top_builddir@/usrp/host/lib/legacy/usrp_dbid.py \ + @abs_top_builddir@/usrp/host/misc \ + @abs_top_builddir@/usrp/host/swig \ + @abs_top_builddir@/grc \ + @abs_top_builddir@/gr-wxgui/src/python \ + @abs_top_builddir@/gr-radio-astronomy/src/python \ + @abs_top_builddir@/omnithread/nt.cc \ + @abs_top_builddir@/omnithread/mach.cc \ + @abs_top_builddir@/gr-audio-alsa/src/audio-alsa.py \ + @abs_top_builddir@/gr-msdd6000/src/msdd.py \ + @abs_top_builddir@/gr-usrp2/src/usrp2.py \ + @abs_top_builddir@/usrp/host/lib/legacy/db_flexrf.h \ + @abs_top_builddir@/usrp/host/lib/legacy/db_flexrf_mimo.h \ + @abs_top_builddir@/usrp/host/lib/legacy/db_wbx.h \ + @abs_top_builddir@/gnuradio-core/doc/other/shared_ptr_docstub.h \ + @abs_top_builddir@/gnuradio-core/doc/other/vector_docstub.h \ + @abs_top_builddir@/gnuradio-core/src/lib/missing/getopt.h \ + @abs_top_builddir@/gnuradio-core/src/lib/filter/gr_altivec.h \ + @abs_top_builddir@/gnuradio-examples/python/apps/hf_radio/output.py \ + @abs_top_builddir@/gnuradio-examples/python/apps/hf_radio/ui.py \ + @abs_top_builddir@/gr-radio-astronomy/src/lib/ra.py \ + @abs_top_builddir@/gcell/ibm/sync/ppu_source/cond.h \ + @abs_top_builddir@/gcell/ibm/sync/ppu_source/libsync.h \ + @abs_top_builddir@/gcell/ibm/sync/spu_source/sync_utils.h # The EXCLUDE_SYMLINKS tag can be used select whether or not files or @@ -624,7 +637,26 @@ EXCLUDE_PATTERNS = \ EXCLUDE_SYMBOLS = ad9862 \ numpy \ - usrpm + usrpm \ + *swig* \ + *Swig* \ + *my_top_block* \ + *my_graph* \ + *app_top_block* \ + *am_rx_graph* \ + *_queue_watcher_thread* \ + *parse* \ + *MyFrame* \ + *MyApp* \ + *PyObject* \ + *wfm_rx_block* \ + *_sptr* \ + *debug* \ + *wfm_rx_sca_block* \ + *tv_rx_block* \ + *wxapt_rx_block* \ + *example_signal* + # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see @@ -676,7 +708,7 @@ FILTER_PATTERNS = *.py=@top_srcdir@/gnuradio-core/doc/other/doxypy.py # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). -FILTER_SOURCE_FILES = YES +FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing @@ -689,7 +721,7 @@ FILTER_SOURCE_FILES = YES # then you must also enable this option. If you don't then doxygen will produce # a warning and turn it on anyway -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. @@ -700,7 +732,7 @@ INLINE_SOURCES = NO # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. -STRIP_CODE_COMMENTS = YES +STRIP_CODE_COMMENTS = NO # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented @@ -743,7 +775,7 @@ VERBATIM_HEADERS = YES # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. -ALPHABETICAL_INDEX = NO +ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns @@ -850,13 +882,13 @@ BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. -TOC_EXPAND = NO +TOC_EXPAND = YES # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. -DISABLE_INDEX = NO +DISABLE_INDEX = YES # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. @@ -870,13 +902,13 @@ ENUM_VALUES_PER_LINE = 4 # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. -TREEVIEW_WIDTH = 250 +TREEVIEW_WIDTH = 180 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output diff --git a/gnuradio-core/doc/other/doxypy.py b/gnuradio-core/doc/other/doxypy.py index 34353b6ac..82fdb6bea 100755 --- a/gnuradio-core/doc/other/doxypy.py +++ b/gnuradio-core/doc/other/doxypy.py @@ -15,8 +15,8 @@ add the following lines to your Doxyfile: INPUT_FILTER = "python /path/to/doxypy.py" """ -__version__ = "0.3rc2" -__date__ = "18th December 2007" +__version__ = "0.4.1" +__date__ = "5th December 2008" __website__ = "http://code.foosel.org/doxypy" __author__ = ( @@ -45,11 +45,19 @@ import re from optparse import OptionParser, OptionGroup class FSM(object): - """ FSM implements a finite state machine. Transitions are given as - 4-tuples, consisting of an origin state, a target state, a condition - for the transition (given as a reference to a function which gets called - with a given piece of input) and a pointer to a function to be called - upon the execution of the given transition. + """Implements a finite state machine. + + Transitions are given as 4-tuples, consisting of an origin state, a target + state, a condition for the transition (given as a reference to a function + which gets called with a given piece of input) and a pointer to a function + to be called upon the execution of the given transition. + """ + + """ + @var transitions holds the transitions + @var current_state holds the current state + @var current_input holds the current input + @var current_transition hold the currently active transition """ def __init__(self, start_state=None, transitions=[]): @@ -66,7 +74,8 @@ class FSM(object): def makeTransition(self, input): """ Makes a transition based on the given input. - @param input input to parse by the FSM + + @param input input to parse by the FSM """ for transition in self.transitions: [from_state, to_state, condition, callback] = transition @@ -76,20 +85,23 @@ class FSM(object): self.current_state = to_state self.current_input = input self.current_transition = transition + if options.debug: + print >>sys.stderr, "# FSM: executing (%s -> %s) for line '%s'" % (from_state, to_state, input) callback(match) return - class Doxypy(object): def __init__(self): - self.start_single_comment_re = re.compile("^\s*(''')") + string_prefixes = "[uU]?[rR]?" + + self.start_single_comment_re = re.compile("^\s*%s(''')" % string_prefixes) self.end_single_comment_re = re.compile("(''')\s*$") - self.start_double_comment_re = re.compile("^\s*(\"\"\")") + self.start_double_comment_re = re.compile("^\s*%s(\"\"\")" % string_prefixes) self.end_double_comment_re = re.compile("(\"\"\")\s*$") - self.single_comment_re = re.compile("^\s*(''').*(''')\s*$") - self.double_comment_re = re.compile("^\s*(\"\"\").*(\"\"\")\s*$") + self.single_comment_re = re.compile("^\s*%s(''').*(''')\s*$" % string_prefixes) + self.double_comment_re = re.compile("^\s*%s(\"\"\").*(\"\"\")\s*$" % string_prefixes) self.defclass_re = re.compile("^(\s*)(def .+:|class .+:)") self.empty_re = re.compile("^\s*$") @@ -141,6 +153,7 @@ class Doxypy(object): # other lines ["DEFCLASS", "DEFCLASS", self.empty_re.search, self.appendDefclassLine], ["DEFCLASS", "DEFCLASS", self.defclass_re.search, self.resetCommentSearch], + ["DEFCLASS", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.resetCommentSearch], ["DEFCLASS", "DEFCLASS_BODY", self.catchall, self.stopCommentSearch], ### DEFCLASS_BODY @@ -155,16 +168,16 @@ class Doxypy(object): ] self.fsm = FSM("FILEHEAD", transitions) + self.outstream = sys.stdout self.output = [] - self.comment = [] self.filehead = [] self.defclass = [] self.indent = "" def __closeComment(self): - """ Appends any open comment block and triggering block to the output. """ + """Appends any open comment block and triggering block to the output.""" if options.autobrief: if len(self.comment) == 1 \ @@ -179,59 +192,90 @@ class Doxypy(object): self.output.extend(self.defclass) def __docstringSummaryToBrief(self, line): - """ Adds \\brief to the docstrings summary line. + """Adds \\brief to the docstrings summary line. - A \\brief is prepended, provided no other doxygen command is at the start of the line. + A \\brief is prepended, provided no other doxygen command is at the + start of the line. """ stripped = line.strip() if stripped and not stripped[0] in ('@', '\\'): return "\\brief " + line else: return line + + def __flushBuffer(self): + """Flushes the current outputbuffer to the outstream.""" + if self.output: + try: + if options.debug: + print >>sys.stderr, "# OUTPUT: ", self.output + print >>self.outstream, "\n".join(self.output) + self.outstream.flush() + except IOError: + # Fix for FS#33. Catches "broken pipe" when doxygen closes + # stdout prematurely upon usage of INPUT_FILTER, INLINE_SOURCES + # and FILTER_SOURCE_FILES. + pass + self.output = [] def catchall(self, input): - """ The catchall-condition, always returns true. """ + """The catchall-condition, always returns true.""" return True def resetCommentSearch(self, match): - """ Restarts a new comment search for a different triggering line. - Closes the current commentblock and starts a new comment search. + """Restarts a new comment search for a different triggering line. + + Closes the current commentblock and starts a new comment search. """ + if options.debug: + print >>sys.stderr, "# CALLBACK: resetCommentSearch" self.__closeComment() self.startCommentSearch(match) def startCommentSearch(self, match): - """ Starts a new comment search. - Saves the triggering line, resets the current comment and saves - the current indentation. + """Starts a new comment search. + + Saves the triggering line, resets the current comment and saves + the current indentation. """ + if options.debug: + print >>sys.stderr, "# CALLBACK: startCommentSearch" self.defclass = [self.fsm.current_input] self.comment = [] self.indent = match.group(1) def stopCommentSearch(self, match): - """ Stops a comment search. - Closes the current commentblock, resets the triggering line and - appends the current line to the output. + """Stops a comment search. + + Closes the current commentblock, resets the triggering line and + appends the current line to the output. """ + if options.debug: + print >>sys.stderr, "# CALLBACK: stopCommentSearch" self.__closeComment() self.defclass = [] self.output.append(self.fsm.current_input) def appendFileheadLine(self, match): - """ Appends a line in the FILEHEAD state. - Closes the open comment block, resets it and appends the current line. + """Appends a line in the FILEHEAD state. + + Closes the open comment block, resets it and appends the current line. """ + if options.debug: + print >>sys.stderr, "# CALLBACK: appendFileheadLine" self.__closeComment() self.comment = [] self.output.append(self.fsm.current_input) def appendCommentLine(self, match): - """ Appends a comment line. - The comment delimiter is removed from multiline start and ends as - well as singleline comments. + """Appends a comment line. + + The comment delimiter is removed from multiline start and ends as + well as singleline comments. """ + if options.debug: + print >>sys.stderr, "# CALLBACK: appendCommentLine" (from_state, to_state, condition, callback) = self.fsm.current_transition # single line comment @@ -266,17 +310,22 @@ class Doxypy(object): self.comment.append(self.fsm.current_input) def appendNormalLine(self, match): - """ Appends a line to the output. """ + """Appends a line to the output.""" + if options.debug: + print >>sys.stderr, "# CALLBACK: appendNormalLine" self.output.append(self.fsm.current_input) def appendDefclassLine(self, match): - """ Appends a line to the triggering block. """ + """Appends a line to the triggering block.""" + if options.debug: + print >>sys.stderr, "# CALLBACK: appendDefclassLine" self.defclass.append(self.fsm.current_input) def makeCommentBlock(self): - """ Indents the current comment block with respect to the current - indentation level. - @returns a list of indented comment lines + """Indents the current comment block with respect to the current + indentation level. + + @returns a list of indented comment lines """ doxyStart = "##" commentLines = self.comment @@ -288,42 +337,59 @@ class Doxypy(object): return l def parse(self, input): - """ Parses a python file given as input string and returns the doxygen- - compatible representation. - @param input the python code to parse - @returns the modified python code + """Parses a python file given as input string and returns the doxygen- + compatible representation. + + @param input the python code to parse + @returns the modified python code """ lines = input.split("\n") for line in lines: self.fsm.makeTransition(line) - + if self.fsm.current_state == "DEFCLASS": self.__closeComment() return "\n".join(self.output) -def loadFile(filename): - """ Loads file "filename" and returns the content. - @param filename The name of the file to load - @returns the content of the file. - """ - f = open(filename, 'r') - - try: - content = f.read() - return content - finally: + def parseFile(self, filename): + """Parses a python file given as input string and returns the doxygen- + compatible representation. + + @param input the python code to parse + @returns the modified python code + """ + f = open(filename, 'r') + + for line in f: + self.parseLine(line.rstrip('\r\n')) + if self.fsm.current_state == "DEFCLASS": + self.__closeComment() + self.__flushBuffer() f.close() - + + def parseLine(self, line): + """Parse one line of python and flush the resulting output to the + outstream. + + @param line the python code line to parse + """ + self.fsm.makeTransition(line) + self.__flushBuffer() + def optParse(): - """ Parses commandline options. """ + """Parses commandline options.""" parser = OptionParser(prog=__applicationName__, version="%prog " + __version__) parser.set_usage("%prog [options] filename") parser.add_option("--autobrief", action="store_true", dest="autobrief", - help="Use the docstring summary line as \\brief description" + help="use the docstring summary line as \\brief description" + ) + parser.add_option("--debug", + action="store_true", dest="debug", + help="enable debug output on stderr" ) ## parse options @@ -337,20 +403,12 @@ def optParse(): return filename[0] def main(): - """ Opens the file given as first commandline argument and processes it, - then prints out the processed file. + """Starts the parser on the file given by the filename as the first + argument on the commandline. """ filename = optParse() - - try: - input = loadFile(filename) - except IOError, (errno, msg): - print >>sys.stderr, msg - sys.exit(-1) - fsm = Doxypy() - output = fsm.parse(input) - print output + fsm.parseFile(filename) if __name__ == "__main__": - main()
\ No newline at end of file + main() diff --git a/gnuradio-core/doc/other/group_defs.dox b/gnuradio-core/doc/other/group_defs.dox index 77cb58612..7373236ce 100644 --- a/gnuradio-core/doc/other/group_defs.dox +++ b/gnuradio-core/doc/other/group_defs.dox @@ -38,6 +38,14 @@ * \defgroup synch Synchronization */ +/*! + * \defgroup packet Packetization + */ + +/*! + * \defgroup logic Logical + */ + /*! @} */ /*! \defgroup filter_design Digital Filter Design */ @@ -83,4 +91,5 @@ /*! @} */ /*! \defgroup usrp USRP */ +/*! \defgroup usrp2 USRP2 */ /*! \defgroup hardware Hardware */ |