diff options
Diffstat (limited to 'docs/doxygen')
-rw-r--r-- | docs/doxygen/Doxyfile.in | 1590 | ||||
-rw-r--r-- | docs/doxygen/Makefile.am | 51 | ||||
-rw-r--r-- | docs/doxygen/other/Makefile.am | 32 | ||||
-rwxr-xr-x | docs/doxygen/other/doxypy.py | 414 | ||||
-rw-r--r-- | docs/doxygen/other/group_defs.dox | 95 | ||||
-rw-r--r-- | docs/doxygen/other/main_page.dox | 5 | ||||
-rw-r--r-- | docs/doxygen/other/omnithread.html | 411 | ||||
-rw-r--r-- | docs/doxygen/other/omnithread.pdf | bin | 0 -> 126474 bytes | |||
-rw-r--r-- | docs/doxygen/other/omnithread.ps | 730 | ||||
-rwxr-xr-x | docs/doxygen/other/shared_ptr_docstub.h | 24 | ||||
-rw-r--r-- | docs/doxygen/other/tv-channel-frequencies | 79 | ||||
-rw-r--r-- | docs/doxygen/other/vector_docstub.h | 16 | ||||
-rw-r--r-- | docs/doxygen/xml-swig/Makefile.am | 25 | ||||
-rw-r--r-- | docs/doxygen/xml-swig/README | 129 | ||||
-rw-r--r-- | docs/doxygen/xml-swig/doxy2swig.py | 371 | ||||
-rw-r--r-- | docs/doxygen/xml-swig/swig.xsl | 38 |
16 files changed, 4010 insertions, 0 deletions
diff --git a/docs/doxygen/Doxyfile.in b/docs/doxygen/Doxyfile.in new file mode 100644 index 000000000..bf9b0ef47 --- /dev/null +++ b/docs/doxygen/Doxyfile.in @@ -0,0 +1,1590 @@ +# Doxyfile 1.5.7.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +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@ C++ 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 +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, +# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, +# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, +# Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +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 +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# 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 = YES + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# 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 +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = YES + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 4 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +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 = 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. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# 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}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = NO + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = NO + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = NO + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= NO + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# 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 = 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 +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text " + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = @top_srcdir@ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = *.h \ + *.dox + +# 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. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = @abs_top_builddir@/docs/doxygen/html \ + @abs_top_builddir@/docs/doxygen/xml \ + @abs_top_builddir@/docs/doxygen/xml-swig \ + @abs_top_builddir@/docs/doxygen/other/doxypy.py \ + @abs_top_builddir@/dtools \ + @abs_top_builddir@/gcell/ibm \ + @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/gr_altivec.h \ + @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/missing/getopt.h \ + @abs_top_builddir@/gnuradio-core/src/lib/runtime/gr_error_handler.cc \ + @abs_top_builddir@/gnuradio-core/src/lib/swig \ + @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@/gnuradio-examples/python/apps/hf_radio/output.py \ + @abs_top_builddir@/gnuradio-examples/python/apps/hf_radio/ui.py \ + @abs_top_builddir@/gr-atsc/src/lib/atsc.cc \ + @abs_top_builddir@/gr-atsc/src/lib/atsc.py \ + @abs_top_builddir@/gr-atsc/src/lib/gen_encoder.py \ + @abs_top_builddir@/gr-atsc/src/python \ + @abs_top_builddir@/gr-atsc/src/python \ + @abs_top_builddir@/gr-audio-alsa/src/audio-alsa.py \ + @abs_top_builddir@/gr-audio-oss/src/audio_oss.py \ + @abs_top_builddir@/gr-audio-osx/src/test_audio_loop.py \ + @abs_top_builddir@/gr-cvsd-vocoder/src/lib/cvsd_vocoder.py \ + @abs_top_builddir@/gr-cvsd-vocoder/src/python/encdec.py \ + @abs_top_builddir@/gr-gsm-fr-vocoder/src/lib/gsm \ + @abs_top_builddir@/gr-gsm-fr-vocoder/src/lib/gsm_full_rate.py \ + @abs_top_builddir@/gr-gsm-fr-vocoder/src/python/encdec.py \ + @abs_top_builddir@/gr-howto-write-a-block \ + @abs_top_builddir@/gr-msdd6000/src/msdd.py \ + @abs_top_builddir@/gr-pager/src/pager_swig.py \ + @abs_top_builddir@/gr-qtgui \ + @abs_top_builddir@/gr-radar-mono/src/python/usrp_radar_mono.py \ + @abs_top_builddir@/gr-radio-astronomy/src/lib/ra.py \ + @abs_top_builddir@/gr-radio-astronomy/src/python \ + @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@/gr-trellis/src/lib/trellis.py \ + @abs_top_builddir@/gr-usrp/src/usrp1.py \ + @abs_top_builddir@/gr-usrp2/src/usrp2.py \ + @abs_top_builddir@/gr-video-sdl/src/video_sdl.py \ + @abs_top_builddir@/gr-wxgui/src/python \ + @abs_top_builddir@/grc \ + @abs_top_builddir@/omnithread/mach.cc \ + @abs_top_builddir@/omnithread/nt.cc \ + @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/db_wbx.h \ + @abs_top_builddir@/usrp/host/lib/legacy/db_wbx.cc \ + @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@/usrp2/firmware \ + @abs_top_builddir@/usrp2/fpga + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = */.deps/* \ + */.libs/* \ + */.svn/* \ + */CVS/* \ + */__init__.py \ + */gr-atsc/src/lib/Gr* \ + */moc_*.cc \ + */omnithread/ot_* \ + */qa_*.cc \ + */qa_*.h \ + */qa_*.py + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = ad9862 \ + numpy \ + 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 +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = *.py=@top_srcdir@/gnuradio-core/doc/other/doxypy.py + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# 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 = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = NO + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +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 +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = @enable_html_docs@ + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +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 = YES + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# <a href="http://doc.trolltech.com/qthelpproject.html#namespace">Qt Help Project / Namespace</a>. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# <a href="http://doc.trolltech.com/qthelpproject.html#virtual-folders">Qt Help Project / Virtual Folders</a>. + +QHP_VIRTUAL_FOLDER = doc + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file . + +QHG_LOCATION = + +# 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 = 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. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to FRAME, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. Other possible values +# for this tag are: HIERARCHIES, which will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list; +# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which +# disables this behavior completely. For backwards compatibility with previous +# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE +# respectively. + +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 = 180 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = @enable_latex_docs@ + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = letter + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = @enable_xml_docs@ + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = NO + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = @HAVE_DOT@ + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = NO + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = NO diff --git a/docs/doxygen/Makefile.am b/docs/doxygen/Makefile.am new file mode 100644 index 000000000..3a67fb6d4 --- /dev/null +++ b/docs/doxygen/Makefile.am @@ -0,0 +1,51 @@ +# +# Copyright 2001,2005,2009 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +include $(top_srcdir)/Makefile.common + +SUBDIRS = other xml-swig + +dist_gr_doc_DATA = \ + $(top_srcdir)/README \ + $(top_srcdir)/README.hacking + +all-local: prep @generate_docs@ +doc: docs # alias + +docs: prep html/index.html +html/index.html: + @DOXYGEN@ + +prep: + $(MKDIR_P) html + $(MKDIR_P) xml + +install-data-local: + $(MKDIR_P) $(DESTDIR)$(gr_docdir) + cp -r html $(DESTDIR)$(gr_docdir) + cp -r xml $(DESTDIR)$(gr_docdir) + +uninstall-local: + $(RM) -fr $(DESTDIR)$(gr_docdir)/html + $(RM) -fr $(DESTDIR)$(gr_docdir)/xml + +clean-local: + $(RM) -fr latex html man xml diff --git a/docs/doxygen/other/Makefile.am b/docs/doxygen/other/Makefile.am new file mode 100644 index 000000000..5e05d5d36 --- /dev/null +++ b/docs/doxygen/other/Makefile.am @@ -0,0 +1,32 @@ +# +# Copyright 2001,2004 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +include $(top_srcdir)/Makefile.common + +EXTRA_DIST = \ + doxypy.py \ + group_defs.dox \ + omnithread.html \ + omnithread.pdf \ + omnithread.ps \ + shared_ptr_docstub.h \ + tv-channel-frequencies \ + vector_docstub.h diff --git a/docs/doxygen/other/doxypy.py b/docs/doxygen/other/doxypy.py new file mode 100755 index 000000000..82fdb6bea --- /dev/null +++ b/docs/doxygen/other/doxypy.py @@ -0,0 +1,414 @@ +#!/usr/bin/env python + +__applicationName__ = "doxypy" +__blurb__ = """ +doxypy is an input filter for Doxygen. It preprocesses python +files so that docstrings of classes and functions are reformatted +into Doxygen-conform documentation blocks. +""" + +__doc__ = __blurb__ + \ +""" +In order to make Doxygen preprocess files through doxypy, simply +add the following lines to your Doxyfile: + FILTER_SOURCE_FILES = YES + INPUT_FILTER = "python /path/to/doxypy.py" +""" + +__version__ = "0.4.1" +__date__ = "5th December 2008" +__website__ = "http://code.foosel.org/doxypy" + +__author__ = ( + "Philippe 'demod' Neumann (doxypy at demod dot org)", + "Gina 'foosel' Haeussge (gina at foosel dot net)" +) + +__licenseName__ = "GPL v2" +__license__ = """This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +""" + +import sys +import re + +from optparse import OptionParser, OptionGroup + +class FSM(object): + """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=[]): + self.transitions = transitions + self.current_state = start_state + self.current_input = None + self.current_transition = None + + def setStartState(self, state): + self.current_state = state + + def addTransition(self, from_state, to_state, condition, callback): + self.transitions.append([from_state, to_state, condition, callback]) + + def makeTransition(self, input): + """ Makes a transition based on the given input. + + @param input input to parse by the FSM + """ + for transition in self.transitions: + [from_state, to_state, condition, callback] = transition + if from_state == self.current_state: + match = condition(input) + if match: + 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): + 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*%s(\"\"\")" % string_prefixes) + self.end_double_comment_re = re.compile("(\"\"\")\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*$") + self.hashline_re = re.compile("^\s*#.*$") + self.importline_re = re.compile("^\s*(import |from .+ import)") + + self.multiline_defclass_start_re = re.compile("^(\s*)(def|class)(\s.*)?$") + self.multiline_defclass_end_re = re.compile(":\s*$") + + ## Transition list format + # ["FROM", "TO", condition, action] + transitions = [ + ### FILEHEAD + + # single line comments + ["FILEHEAD", "FILEHEAD", self.single_comment_re.search, self.appendCommentLine], + ["FILEHEAD", "FILEHEAD", self.double_comment_re.search, self.appendCommentLine], + + # multiline comments + ["FILEHEAD", "FILEHEAD_COMMENT_SINGLE", self.start_single_comment_re.search, self.appendCommentLine], + ["FILEHEAD_COMMENT_SINGLE", "FILEHEAD", self.end_single_comment_re.search, self.appendCommentLine], + ["FILEHEAD_COMMENT_SINGLE", "FILEHEAD_COMMENT_SINGLE", self.catchall, self.appendCommentLine], + ["FILEHEAD", "FILEHEAD_COMMENT_DOUBLE", self.start_double_comment_re.search, self.appendCommentLine], + ["FILEHEAD_COMMENT_DOUBLE", "FILEHEAD", self.end_double_comment_re.search, self.appendCommentLine], + ["FILEHEAD_COMMENT_DOUBLE", "FILEHEAD_COMMENT_DOUBLE", self.catchall, self.appendCommentLine], + + # other lines + ["FILEHEAD", "FILEHEAD", self.empty_re.search, self.appendFileheadLine], + ["FILEHEAD", "FILEHEAD", self.hashline_re.search, self.appendFileheadLine], + ["FILEHEAD", "FILEHEAD", self.importline_re.search, self.appendFileheadLine], + ["FILEHEAD", "DEFCLASS", self.defclass_re.search, self.resetCommentSearch], + ["FILEHEAD", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.resetCommentSearch], + ["FILEHEAD", "DEFCLASS_BODY", self.catchall, self.appendFileheadLine], + + ### DEFCLASS + + # single line comments + ["DEFCLASS", "DEFCLASS_BODY", self.single_comment_re.search, self.appendCommentLine], + ["DEFCLASS", "DEFCLASS_BODY", self.double_comment_re.search, self.appendCommentLine], + + # multiline comments + ["DEFCLASS", "COMMENT_SINGLE", self.start_single_comment_re.search, self.appendCommentLine], + ["COMMENT_SINGLE", "DEFCLASS_BODY", self.end_single_comment_re.search, self.appendCommentLine], + ["COMMENT_SINGLE", "COMMENT_SINGLE", self.catchall, self.appendCommentLine], + ["DEFCLASS", "COMMENT_DOUBLE", self.start_double_comment_re.search, self.appendCommentLine], + ["COMMENT_DOUBLE", "DEFCLASS_BODY", self.end_double_comment_re.search, self.appendCommentLine], + ["COMMENT_DOUBLE", "COMMENT_DOUBLE", self.catchall, self.appendCommentLine], + + # 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 + + ["DEFCLASS_BODY", "DEFCLASS", self.defclass_re.search, self.startCommentSearch], + ["DEFCLASS_BODY", "DEFCLASS_MULTI", self.multiline_defclass_start_re.search, self.startCommentSearch], + ["DEFCLASS_BODY", "DEFCLASS_BODY", self.catchall, self.appendNormalLine], + + ### DEFCLASS_MULTI + ["DEFCLASS_MULTI", "DEFCLASS", self.multiline_defclass_end_re.search, self.appendDefclassLine], + ["DEFCLASS_MULTI", "DEFCLASS_MULTI", self.catchall, self.appendDefclassLine], + ] + + 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.""" + + if options.autobrief: + if len(self.comment) == 1 \ + or (len(self.comment) > 2 and self.comment[1].strip() == ''): + self.comment[0] = self.__docstringSummaryToBrief(self.comment[0]) + + if self.comment: + block = self.makeCommentBlock() + self.output.extend(block) + + if self.defclass: + self.output.extend(self.defclass) + + def __docstringSummaryToBrief(self, line): + """Adds \\brief to the docstrings summary 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.""" + 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. + """ + 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. + """ + 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. + """ + 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. + """ + 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. + """ + if options.debug: + print >>sys.stderr, "# CALLBACK: appendCommentLine" + (from_state, to_state, condition, callback) = self.fsm.current_transition + + # single line comment + if (from_state == "DEFCLASS" and to_state == "DEFCLASS_BODY") \ + or (from_state == "FILEHEAD" and to_state == "FILEHEAD"): + # remove comment delimiter from begin and end of the line + activeCommentDelim = match.group(1) + line = self.fsm.current_input + self.comment.append(line[line.find(activeCommentDelim)+len(activeCommentDelim):line.rfind(activeCommentDelim)]) + + if (to_state == "DEFCLASS_BODY"): + self.__closeComment() + self.defclass = [] + # multiline start + elif from_state == "DEFCLASS" or from_state == "FILEHEAD": + # remove comment delimiter from begin of the line + activeCommentDelim = match.group(1) + line = self.fsm.current_input + self.comment.append(line[line.find(activeCommentDelim)+len(activeCommentDelim):]) + # multiline end + elif to_state == "DEFCLASS_BODY" or to_state == "FILEHEAD": + # remove comment delimiter from end of the line + activeCommentDelim = match.group(1) + line = self.fsm.current_input + self.comment.append(line[0:line.rfind(activeCommentDelim)]) + if (to_state == "DEFCLASS_BODY"): + self.__closeComment() + self.defclass = [] + # in multiline comment + else: + # just append the comment line + self.comment.append(self.fsm.current_input) + + def appendNormalLine(self, match): + """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.""" + 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 + """ + doxyStart = "##" + commentLines = self.comment + + commentLines = map(lambda x: "%s# %s" % (self.indent, x), commentLines) + l = [self.indent + doxyStart] + l.extend(commentLines) + + 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 + """ + 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 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.""" + 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" + ) + parser.add_option("--debug", + action="store_true", dest="debug", + help="enable debug output on stderr" + ) + + ## parse options + global options + (options, filename) = parser.parse_args() + + if not filename: + print >>sys.stderr, "No filename given." + sys.exit(-1) + + return filename[0] + +def main(): + """Starts the parser on the file given by the filename as the first + argument on the commandline. + """ + filename = optParse() + fsm = Doxypy() + fsm.parseFile(filename) + +if __name__ == "__main__": + main() diff --git a/docs/doxygen/other/group_defs.dox b/docs/doxygen/other/group_defs.dox new file mode 100644 index 000000000..7373236ce --- /dev/null +++ b/docs/doxygen/other/group_defs.dox @@ -0,0 +1,95 @@ +/*! + * \defgroup block Signal Processing Blocks + * These are the signal processing blocks... + * @{ + */ + +/*! + * \defgroup source Signal Sources + * signal sources docs... + */ + +/*! + * \defgroup sink Signal Sinks + * docs for sinks... + */ + +/*! + * \defgroup filter Filters + */ + +/*! + * \defgroup converter Type Conversions + */ + +/*! + * \defgroup level Signal Level Control + */ + +/*! + * \defgroup clock Signal Clock Synchronization + */ + +/*! + * \defgroup dft Fourier Transformation + */ + +/*! + * \defgroup synch Synchronization + */ + +/*! + * \defgroup packet Packetization + */ + +/*! + * \defgroup logic Logical + */ + +/*! @} */ + +/*! \defgroup filter_design Digital Filter Design */ +/*! \defgroup graphical Graphical Utilities */ +/*! \defgroup encdec Voice Encoders and Decoders */ +/*! \defgroup coding Information Coding and Decoding */ +/*! \defgroup modulation Signal Modulation */ +/*! \defgroup demodulation Signal Demodulation */ +/*! \defgroup flow Samples Flow Control */ + +/*! \defgroup math Mathmatics */ +/*! \defgroup tools Tools */ +/*! \defgroup misc Miscellaneous */ +/*! \defgroup internal Implementation Details */ + +/*! \defgroup base Misc Common Base Classes */ +/*! + * \defgroup applications Applications + * These are some applications build using gnuradio... + * @{ + */ + +/*! + * \defgroup atsc ATSC + * ATSC Applications... + */ + +/*! + * \defgroup radar Radar + * Radar Applications... + */ + +/*! + * \defgroup pager Pager + * Pager Applications + */ + +/*! + * \defgroup sounder Sounder + * Channel Sounder + */ + +/*! @} */ + +/*! \defgroup usrp USRP */ +/*! \defgroup usrp2 USRP2 */ +/*! \defgroup hardware Hardware */ diff --git a/docs/doxygen/other/main_page.dox b/docs/doxygen/other/main_page.dox new file mode 100644 index 000000000..5c37905fa --- /dev/null +++ b/docs/doxygen/other/main_page.dox @@ -0,0 +1,5 @@ +/*! \mainpage + +Welcome to GNU Radio! + +*/ diff --git a/docs/doxygen/other/omnithread.html b/docs/doxygen/other/omnithread.html new file mode 100644 index 000000000..5682d1d0b --- /dev/null +++ b/docs/doxygen/other/omnithread.html @@ -0,0 +1,411 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" + "http://www.w3.org/TR/REC-html40/loose.dtd"> +<HTML> +<HEAD><TITLE>The OMNI Thread Abstraction</TITLE> + +<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<META name="GENERATOR" content="hevea 1.06"> +</HEAD> +<BODY > +<!--HEVEA command line is: /usr/local/bin/hevea omnithread --> +<!--HTMLHEAD--> +<!--ENDHTML--> +<!--PREFIX <ARG ></ARG>--> +<!--CUT DEF section 1 --> + + +<H1 ALIGN=center>The OMNI Thread Abstraction</H1> + +<H3 ALIGN=center>Tristan Richardson<BR> +AT&T Laboratories Cambridge<BR> +</H3> + +<H3 ALIGN=center><I>Revised</I> November 2001</H3> +<!--TOC section Introduction--> + +<H2><A NAME="htoc1">1</A> Introduction</H2><!--SEC END --> + +The OMNI thread abstraction is designed to provide a common set of +thread operations for use in programs written in C++. Programs +written using the abstraction should be much easier to port between +different architectures with different underlying threads primitives.<BR> +<BR> +The programming interface is designed to be similar to the C language +interface to POSIX threads (IEEE draft standard 1003.1c --- previously +1003.4a, often known as ``pthreads'' [<A HREF="#pthreads"><CITE>POSIX94</CITE></A>]).<BR> +<BR> +Much of the abstraction consists of simple C++ object wrappers around +pthread calls. However for some features such as thread-specific +data, a better interface can be offered because of the use of C++.<BR> +<BR> +Some of the more complex features of pthreads are not supported +because of the difficulty of ensuring the same features can be offered +on top of other thread systems. Such features include thread +cancellation and complex scheduling control (though simple thread +priorities are supported).<BR> +<BR> +The abstraction layer is currently implemented for the following +architectures / thread systems: +<UL><LI>Solaris 2.x using pthreads draft 10 +<LI>Solaris 2.x using solaris threads (but pthreads version is now standard) +<LI>Alpha OSF1 using pthreads draft 4 +<LI>Windows NT using NT threads +<LI>Linux 2.x using Linuxthread 0.5 (which is based on pthreads draft 10) +<LI>Linux 2.x using MIT pthreads (which is based on draft 8) +<LI>ATMos using pthreads draft 6 (but not Virata ATMos)</UL> +See the <TT>omnithread.h</TT> header file for full details of the API. +The descriptions below assume you have some previous knowledge of +threads, mutexes, condition variables and semaphores. Also refer to +other documentation ([<A HREF="#birrell"><CITE>Birrell89</CITE></A>], [<A HREF="#pthreads"><CITE>POSIX94</CITE></A>]) for further +explanation of these ideas (particularly condition variables, the use +of which may not be particularly intuitive when first encountered).<BR> +<BR> +<!--TOC section Synchronisation objects--> + +<H2><A NAME="htoc2">2</A> Synchronisation objects</H2><!--SEC END --> + +Synchronisation objects are used to synchronise threads within the +same process. There is no inter-process synchronisation provided. +The synchronisation objects provided are mutexes, condition variables +and counting semaphores.<BR> +<BR> +<!--TOC subsection Mutex--> + +<H3><A NAME="htoc3">2.1</A> Mutex</H3><!--SEC END --> + +An object of type <TT>omni_mutex</TT> is used for mutual exclusion. +It provides two operations, <TT>lock()</TT> and <TT>unlock()</TT>. +The alternative names <TT>acquire()</TT> and <TT>release()</TT> can be +used if preferred. Behaviour is undefined when a thread attempts to +lock the same mutex again or when a mutex is locked by one thread and +unlocked by a different thread.<BR> +<BR> +<!--TOC subsection Condition Variable--> + +<H3><A NAME="htoc4">2.2</A> Condition Variable</H3><!--SEC END --> + +A condition variable is represented by an <TT>omni_condition</TT> and +is used for signalling between threads. A call to <TT>wait()</TT> +causes a thread to wait on the condition variable. A call to +<TT>signal()</TT> wakes up at least one thread if any are waiting. A +call to <TT>broadcast()</TT> wakes up all threads waiting on the +condition variable.<BR> +<BR> +When constructed, a pointer to an <TT>omni_mutex</TT> must be given. +A condition variable <TT>wait()</TT> has an implicit mutex +<TT>unlock()</TT> and <TT>lock()</TT> around it. The link between +condition variable and mutex lasts for the lifetime of the condition +variable (unlike pthreads where the link is only for the duration of +the wait). The same mutex may be used with several condition +variables.<BR> +<BR> +A wait with a timeout can be achieved by calling +<TT>timed_wait()</TT>. This is given an absolute time to wait until. +The routine <TT>omni_thread::get_time()</TT> can be used to turn a +relative time into an absolute time. <TT>timed_wait()</TT> returns +<TT>true</TT> if the condition was signalled, <TT>false</TT> if the +time expired before the condition variable was signalled.<BR> +<BR> +<!--TOC subsection Counting semaphores--> + +<H3><A NAME="htoc5">2.3</A> Counting semaphores</H3><!--SEC END --> + +An <TT>omni_semaphore</TT> is a counting semaphore. When created it +is given an initial unsigned integer value. When <TT>wait()</TT> is +called, the value is decremented if non-zero. If the value is zero +then the thread blocks instead. When <TT>post()</TT> is called, if +any threads are blocked in <TT>wait()</TT>, exactly one thread is +woken. If no threads were blocked then the value of the semaphore is +incremented.<BR> +<BR> +If a thread calls <TT>try_wait()</TT>, then the thread won't block if +the semaphore's value is 0, returning <TT>false</TT> instead.<BR> +<BR> +There is no way of querying the value of the semaphore.<BR> +<BR> +<!--TOC section Thread object--> + +<H2><A NAME="htoc6">3</A> Thread object</H2><!--SEC END --> + +A thread is represented by an <TT>omni_thread</TT> object. There are +broadly two different ways in which it can be used.<BR> +<BR> +The first way is simply to create an <TT>omni_thread</TT> object, +giving a particular function which the thread should execute. This is +like the POSIX (or any other) C language interface.<BR> +<BR> +The second method of use is to create a new class which inherits from +<TT>omni_thread</TT>. In this case the thread will execute the +<TT>run()</TT> member function of the new class. One advantage of +this scheme is that thread-specific data can be implemented simply by +having data members of the new class.<BR> +<BR> +When constructed a thread is in the "new" state and has not actually +started. A call to <TT>start()</TT> causes the thread to begin +executing. A static member function <TT>create()</TT> is provided to +construct and start a thread in a single call. A thread exits by +calling <TT>exit()</TT> or by returning from the thread function.<BR> +<BR> +Threads can be either detached or undetached. Detached threads are +threads for which all state will be lost upon exit. Other threads +cannot determine when a detached thread will disappear, and therefore +should not attempt to access the thread object unless some explicit +synchronisation with the detached thread guarantees that it still +exists.<BR> +<BR> +Undetached threads are threads for which storage is not reclaimed +until another thread waits for its termination by calling +<TT>join()</TT>. An exit value can be passed from an undetached +thread to the thread which joins it.<BR> +<BR> +Detached / undetached threads are distinguished on creation by the +type of function they execute. Undetached threads execute a function +which has a <TT>void*</TT> return type, whereas detached threads +execute a function which has a <TT>void</TT> return type. +Unfortunately C++ member functions are not allowed to be distinguished +simply by their return type. Thus in the case of a derived class of +<TT>omni_thread</TT> which needs an undetached thread, the member +function executed by the thread is called <TT>run_undetached()</TT> +rather than <TT>run()</TT>, and it is started by calling +<TT>start_undetached()</TT> instead of <TT>start()</TT>.<BR> +<BR> +The abstraction currently supports three priorities of thread, but no +guarantee is made of how this will affect underlying thread +scheduling. The three priorities are <TT>PRIORITY_LOW</TT>, +<TT>PRIORITY_NORMAL</TT> and <TT>PRIORITY_HIGH</TT>. By default all +threads run at <TT>PRIORITY_NORMAL</TT>. A different priority can be +specified on thread creation, or while the thread is running using +<TT>set_priority().</TT> A thread's current priority is returned by +<TT>priority()</TT>.<BR> +<BR> +Other functions provided are <TT>self()</TT> which returns the calling +thread's <TT>omni_thread</TT> object, <TT>yield()</TT> which +requests that other threads be allowed to run, <TT>id()</TT> which +returns an integer id for the thread for use in debugging, +<TT>state()</TT>, <TT>sleep()</TT> and <TT>get_time()</TT>.<BR> +<BR> +<!--TOC section Per-thread data--> + +<H2><A NAME="htoc7">4</A> Per-thread data</H2><!--SEC END --> + +omnithread supports per-thread data, via member functions of the +<TT>omni_thread</TT> object.<BR> +<BR> +First, you must allocate a key for with the +<TT>omni_thread::allocate_key()</TT> function. Then, any object +whose class is derived from <TT>omni_thread::value_t</TT> can be +stored using the <TT>set_value()</TT> function. Values are retrieved +or removed with <TT>get_value()</TT> and <TT>remove_value()</TT> +respectively.<BR> +<BR> +When the thread exits, all per-thread data is deleted (hence the base +class with virtual destructor).<BR> +<BR> +Note that the per-thread data functions are <B>not</B> thread safe, +so although you can access one thread's storage from another thread, +there is no concurrency control. Unless you really know what you are +doing, it is best to only access per-thread data from the thread it is +attached to.<BR> +<BR> +<!--TOC section Using OMNI threads in your program--> + +<H2><A NAME="htoc8">5</A> Using OMNI threads in your program</H2><!--SEC END --> + +Obviously you need to include the <TT>omnithread.h</TT> header file in +your source code, and link in the omnithread library with your +executable. Because there is a single <TT>omnithread.h</TT> for all +platforms, certain preprocessor defines must be given as compiler +options. The easiest way to do this is to study the makefiles given +in the examples provided with this distribution. If you are to +include OMNI threads in your own development environment, these are +the necessary preprocessor defines:<BR> +<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1> +<TR><TD ALIGN=left NOWRAP>Platform</TD> +<TD ALIGN=left NOWRAP>Preprocessor Defines</TD> +</TR> +<TR><TD ALIGN=left NOWRAP>Sun Solaris 2.x</TD> +<TD ALIGN=left NOWRAP><CODE>-D__sunos__ -D__sparc__ -D__OSVERSION__=5</CODE></TD> +</TR> +<TR><TD ALIGN=left NOWRAP> </TD> +<TD ALIGN=left NOWRAP><CODE>-DSVR4 -DUsePthread -D_REENTRANT</CODE></TD> +</TR> +<TR><TD ALIGN=left NOWRAP>x86 Linux 2.0</TD> +<TD ALIGN=left NOWRAP><CODE>-D__linux__ -D__i86__ -D__OSVERSION__=2</CODE></TD> +</TR> +<TR><TD ALIGN=left NOWRAP>with linuxthreads 0.5</TD> +<TD ALIGN=left NOWRAP><CODE>-D_REENTRANT</CODE></TD> +</TR> +<TR><TD ALIGN=left NOWRAP>Digital Unix 3.2</TD> +<TD ALIGN=left NOWRAP><CODE>-D__osf1__ -D__alpha__ -D__OSVERSION__=3</CODE></TD> +</TR> +<TR><TD ALIGN=left NOWRAP> </TD> +<TD ALIGN=left NOWRAP><CODE>-D_REENTRANT</CODE></TD> +</TR> +<TR><TD ALIGN=left NOWRAP>Windows NT</TD> +<TD ALIGN=left NOWRAP><CODE>-D__NT__ -MD</CODE></TD> +</TR></TABLE><BR> +<!--TOC section Threaded I/O shutdown for Unix--> + +<H2><A NAME="htoc9">6</A> Threaded I/O shutdown for Unix</H2><!--SEC END --> + +or, how one thread should tell another thread to shut down when it +might be doing a blocking call on a socket.<BR> +<BR> +<B>If you are using omniORB, you don't need to worry about all +this, since omniORB does it for you.</B> This section is only relevant +if you are using omnithread in your own socket-based programming. It +is also seriously out of date.<BR> +<BR> +Unfortunately there doesn't seem to be a standard way of doing this +which works across all Unix systems. I have investigated the +behaviour of Solaris 2.5 and Digital Unix 3.2. On Digital Unix +everything is fine, as the obvious method using shutdown() seems to +work OK. Unfortunately on Solaris shutdown can only be used on a +connected socket, so we need devious means to get around this +limitation. The details are summarised below:<BR> +<BR> +<!--TOC subsection read()--> + +<H3><A NAME="htoc10">6.1</A> read()</H3><!--SEC END --> + +Thread A is in a loop, doing <CODE>read(sock)</CODE>, processing the data, +then going back into the read.<BR> +<BR> +Thread B comes along and wants to shut it down --- it can't cancel +thread A since (i) working out how to clean up according to where A is +in its loop is a nightmare, and (ii) this isn't available in +omnithread anyway.<BR> +<BR> +On Solaris 2.5 and Digital Unix 3.2 the following strategy works:<BR> +<BR> +Thread B does <CODE>shutdown(sock,2)</CODE>.<BR> +<BR> +At this point thread A is either blocked inside <CODE>read(sock)</CODE>, or +is elsewhere in the loop. If the former then read will return 0, +indicating that the socket is closed. If the latter then eventually +thread A will call <CODE>read(sock)</CODE> and then this will return 0. +Thread A should <CODE>close(sock)</CODE>, do any other tidying up, and exit.<BR> +<BR> +If there is another point in the loop that thread A can block then +obviously thread B needs to be aware of this and be able to wake it up +in the appropriate way from that point.<BR> +<BR> +<!--TOC subsection accept()--> + +<H3><A NAME="htoc11">6.2</A> accept()</H3><!--SEC END --> + +Again thread A is in a loop, this time doing an accept on listenSock, +dealing with a new connection and going back into accept. Thread B +wants to cancel it.<BR> +<BR> +On Digital Unix 3.2 the strategy is identical to that for read:<BR> +<BR> +Thread B does <CODE>shutdown(listenSock,2)</CODE>. Wherever thread A is in +the loop, eventually it will return <CODE>ECONNABORTED</CODE> from the +accept call. It should <CODE>close(listenSock)</CODE>, tidy up as necessary +and exit.<BR> +<BR> +On Solaris 2.5 thread B can't do <CODE>shutdown(listenSock,2)</CODE> --- +this returns <CODE>ENOTCONN</CODE>. Instead the following strategy can be +used:<BR> +<BR> +First thread B sets some sort of "shutdown flag" associated with +listenSock. Then it does <CODE>getsockaddr(listenSock)</CODE> to find out +which port listenSock is on (or knows already), sets up a socket +dummySock, does <CODE>connect(dummySock,</CODE> <CODE>this host, port)</CODE> and +finally does <CODE>close(dummySock)</CODE>.<BR> +<BR> +Wherever thread A is in the loop, eventually it will call +<CODE>accept(listenSock)</CODE>. This will return successfully with a new +socket, say connSock. Thread A then checks to see if the "shutdown +flag" is set. If not, then it's a normal connection. If it is set, +then thread A closes listenSock and connSock, tidies up and exits.<BR> +<BR> +<!--TOC subsection write()--> + +<H3><A NAME="htoc12">6.3</A> write()</H3><!--SEC END --> + +Thread A may be blocked in write, or about to go in to a +potentially-blocking write. Thread B wants to shut it down.<BR> +<BR> +On Solaris 2.5:<BR> +<BR> +Thread B does <CODE>shutdown(sock,2)</CODE>.<BR> +<BR> +If thread A is already in <CODE>write(sock)</CODE> then it will return with +<CODE>ENXIO</CODE>. If thread A calls write after thread B calls shutdown +this will return <CODE>EIO</CODE>.<BR> +<BR> +On Digital Unix 3.2:<BR> +<BR> +Thread B does <CODE>shutdown(sock,2)</CODE>.<BR> +<BR> +If thread A is already in <CODE>write(sock)</CODE> then it will return the +number of bytes written before it became blocked. A subsequent call +to write will then generate <CODE>SIGPIPE</CODE> (or <CODE>EPIPE</CODE> will be +returned if <CODE>SIGPIPE</CODE> is ignored by the thread).<BR> +<BR> +<!--TOC subsection connect()--> + +<H3><A NAME="htoc13">6.4</A> connect()</H3><!--SEC END --> + +Thread A may be blocked in connect, or about to go in to a +potentially-blocking connect. Thread B wants to shut it down.<BR> +<BR> +On Digital Unix 3.2:<BR> +<BR> +Thread B does <CODE>shutdown(sock,2)</CODE>.<BR> +<BR> +If thread A is already in <CODE>connect(sock)</CODE> then it will return a +successful connection. Subsequent reading or writing will show that +the socket has been shut down (i.e. read returns 0, write generates +<CODE>SIGPIPE</CODE> or returns <CODE>EPIPE</CODE>). If thread A calls connect +after thread B calls shutdown this will return <CODE>EINVAL</CODE>.<BR> +<BR> +On Solaris 2.5:<BR> +<BR> +There is no way to wake up a thread which is blocked in connect. +Instead Solaris forces us through a ridiculous procedure whichever way +we try it. One way is this:<BR> +<BR> +First thread A creates a pipe in addition to the socket. Instead of +shutting down the socket, thread B simply writes a byte to the pipe.<BR> +<BR> +Thread A meanwhile sets the socket to non-blocking mode using +<CODE>fcntl(sock,</CODE> <CODE>F_SETFL, O_NONBLOCK)</CODE>. Then it calls connect +on the socket --- this will return <CODE>EINPROGRESS</CODE>. Then it must +call <CODE>select()</CODE>, waiting for either sock to become writable or +for the pipe to become readable. If select returns that just sock is +writable then the connection has succeeded. It then needs to set the +socket back to blocking mode using <CODE>fcntl(sock, F_SETFL, 0)</CODE>. If +instead select returns that the pipe is readable, thread A closes the +socket, tidies up and exits.<BR> +<BR> +An alternative method is similar but to use polling instead of the +pipe. Thread B justs sets a flag and thread A calls select with a +timeout, periodically waking up to see if the flag has been set.<BR> +<BR> +<!--TOC section References--> + +<H2>References</H2><!--SEC END --> +<DL COMPACT=compact><DT><A NAME="pthreads"><FONT COLOR=purple>[POSIX94]</FONT></A><DD> +<EM>Portable Operating System Interface (POSIX) Threads Extension</EM>, +P1003.1c Draft 10, +IEEE, +September 1994.<BR> +<BR> +<DT><A NAME="birrell"><FONT COLOR=purple>[Birrell89]</FONT></A><DD> +<EM>An Introduction to Programming with Threads</EM>, +Research Report 35, +DEC Systems Research Center, +Palo Alto, CA, +January 1989.</DL> +<!--HTMLFOOT--> +<!--ENDHTML--> +<!--FOOTER--> +<HR SIZE=2> +<BLOCKQUOTE><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by +</EM><A HREF="http://pauillac.inria.fr/~maranget/hevea/index.html"><EM>H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A</EM></A><EM>. +</EM></BLOCKQUOTE> +</BODY> +</HTML> diff --git a/docs/doxygen/other/omnithread.pdf b/docs/doxygen/other/omnithread.pdf Binary files differnew file mode 100644 index 000000000..b54218744 --- /dev/null +++ b/docs/doxygen/other/omnithread.pdf diff --git a/docs/doxygen/other/omnithread.ps b/docs/doxygen/other/omnithread.ps new file mode 100644 index 000000000..9e858f0b7 --- /dev/null +++ b/docs/doxygen/other/omnithread.ps @@ -0,0 +1,730 @@ +%!PS-Adobe-2.0 +%%Creator: dvipsk 5.86 p1.5d Copyright 1996-2001 ASCII Corp.(www-ptex@ascii.co.jp) +%%based on dvipsk 5.86 Copyright 1999 Radical Eye Software (www.radicaleye.com) +%%Title: omnithread.dvi +%%Pages: 7 +%%PageOrder: Ascend +%%BoundingBox: 0 0 596 842 +%%DocumentFonts: Palatino-Roman Palatino-Italic Palatino-Bold Courier +%%EndComments +%DVIPSWebPage: (www.radicaleye.com) +%DVIPSCommandLine: dvips omnithread +%DVIPSParameters: dpi=600, compressed +%DVIPSSource: TeX output 2002.08.15:1756 +%%BeginProcSet: texc.pro +%! +/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S +N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 +mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 +0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ +landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize +mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ +matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round +exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ +statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] +N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin +/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array +/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 +array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N +df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A +definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get +}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} +B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr +1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 +1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx +0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx +sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ +rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp +gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B +/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ +/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ +A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy +get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} +ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp +fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 +{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add +chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ +1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} +forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn +/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put +}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ +bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A +mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ +SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ +userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X +1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 +index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N +/dir 0 def/dyy{/dir 0 def}B/dyt{/dir 1 def}B/dty{/dir 2 def}B/dtt{/dir 3 +def}B/p{dir 2 eq{-90 rotate show 90 rotate}{dir 3 eq{-90 rotate show 90 +rotate}{show}ifelse}ifelse}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 +N/Ry 0 N/V{}B/RV/v{/Ry X/Rx X V}B statusdict begin/product where{pop +false[(Display)(NeXT)(LaserWriter 16/600)]{A length product length le{A +length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse} +forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{ +BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat +{BDot}imagemask grestore}}ifelse B/QV{gsave newpath transform round exch +round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 +rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B +/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M} +B/g{0 M}B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p +-3 w}B/n{p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{ +0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end + +%%EndProcSet +%%BeginProcSet: 8r.enc +% @@psencodingfile@{ +% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry", +% version = "0.6", +% date = "1 July 1998", +% filename = "8r.enc", +% email = "tex-fonts@@tug.org", +% docstring = "Encoding for TrueType or Type 1 fonts +% to be used with TeX." +% @} +% +% Idea is to have all the characters normally included in Type 1 fonts +% available for typesetting. This is effectively the characters in Adobe +% Standard Encoding + ISO Latin 1 + extra characters from Lucida. +% +% Character code assignments were made as follows: +% +% (1) the Windows ANSI characters are almost all in their Windows ANSI +% positions, because some Windows users cannot easily reencode the +% fonts, and it makes no difference on other systems. The only Windows +% ANSI characters not available are those that make no sense for +% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen +% (173). quotesingle and grave are moved just because it's such an +% irritation not having them in TeX positions. +% +% (2) Remaining characters are assigned arbitrarily to the lower part +% of the range, avoiding 0, 10 and 13 in case we meet dumb software. +% +% (3) Y&Y Lucida Bright includes some extra text characters; in the +% hopes that other PostScript fonts, perhaps created for public +% consumption, will include them, they are included starting at 0x12. +% +% (4) Remaining positions left undefined are for use in (hopefully) +% upward-compatible revisions, if someday more characters are generally +% available. +% +% (5) hyphen appears twice for compatibility with both +% ASCII and Windows. +% +/TeXBase1Encoding [ +% 0x00 (encoded characters from Adobe Standard not in Windows 3.1) + /.notdef /dotaccent /fi /fl + /fraction /hungarumlaut /Lslash /lslash + /ogonek /ring /.notdef + /breve /minus /.notdef +% These are the only two remaining unencoded characters, so may as +% well include them. + /Zcaron /zcaron +% 0x10 + /caron /dotlessi +% (unusual TeX characters available in, e.g., Lucida Bright) + /dotlessj /ff /ffi /ffl + /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef + % very contentious; it's so painful not having quoteleft and quoteright + % at 96 and 145 that we move the things normally found there to here. + /grave /quotesingle +% 0x20 (ASCII begins) + /space /exclam /quotedbl /numbersign + /dollar /percent /ampersand /quoteright + /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +% 0x30 + /zero /one /two /three /four /five /six /seven + /eight /nine /colon /semicolon /less /equal /greater /question +% 0x40 + /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O +% 0x50 + /P /Q /R /S /T /U /V /W + /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +% 0x60 + /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o +% 0x70 + /p /q /r /s /t /u /v /w + /x /y /z /braceleft /bar /braceright /asciitilde + /.notdef % rubout; ASCII ends +% 0x80 + /.notdef /.notdef /quotesinglbase /florin + /quotedblbase /ellipsis /dagger /daggerdbl + /circumflex /perthousand /Scaron /guilsinglleft + /OE /.notdef /.notdef /.notdef +% 0x90 + /.notdef /.notdef /.notdef /quotedblleft + /quotedblright /bullet /endash /emdash + /tilde /trademark /scaron /guilsinglright + /oe /.notdef /.notdef /Ydieresis +% 0xA0 + /.notdef % nobreakspace + /exclamdown /cent /sterling + /currency /yen /brokenbar /section + /dieresis /copyright /ordfeminine /guillemotleft + /logicalnot + /hyphen % Y&Y (also at 45); Windows' softhyphen + /registered + /macron +% 0xD0 + /degree /plusminus /twosuperior /threesuperior + /acute /mu /paragraph /periodcentered + /cedilla /onesuperior /ordmasculine /guillemotright + /onequarter /onehalf /threequarters /questiondown +% 0xC0 + /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla + /Egrave /Eacute /Ecircumflex /Edieresis + /Igrave /Iacute /Icircumflex /Idieresis +% 0xD0 + /Eth /Ntilde /Ograve /Oacute + /Ocircumflex /Otilde /Odieresis /multiply + /Oslash /Ugrave /Uacute /Ucircumflex + /Udieresis /Yacute /Thorn /germandbls +% 0xE0 + /agrave /aacute /acircumflex /atilde + /adieresis /aring /ae /ccedilla + /egrave /eacute /ecircumflex /edieresis + /igrave /iacute /icircumflex /idieresis +% 0xF0 + /eth /ntilde /ograve /oacute + /ocircumflex /otilde /odieresis /divide + /oslash /ugrave /uacute /ucircumflex + /udieresis /yacute /thorn /ydieresis +] def + +%%EndProcSet +%%BeginProcSet: texps.pro +%! +TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 +index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll +exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics +exch def dict begin 0 1 255{exch dup type/integertype ne{pop pop 1 sub +dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} +ifelse}for Metrics/Metrics currentdict end def[2 index currentdict end +definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup +sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll +mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[ +exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if} +forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def +end + +%%EndProcSet +TeXDict begin 39158280 55380996 1000 600 600 (omnithread.dvi) +@start /Fa 134[ 45 45 66 1[ 51 30 35 35 1[ 45 40 51 71 +25 2[ 25 45 45 25 35 45 37 42 40 8[ 66 3[ 56 51 2[ 56 +71 5[ 30 3[ 56 3[ 66 23[ 30 30 40[{ TeXBase1Encoding ReEncodeFont} 31 +90.9091 /Palatino-Italic rf /Fb 134[ 51 1[ 76 1[ 56 30 +40 35 2[ 51 56 81 30 2[ 30 56 51 35 45 56 40 56 45 14[ 66 +2[ 76 5[ 35 6[ 61 19[ 23 30 23 4[ 25 39[{ TeXBase1Encoding ReEncodeFont} +27 90.9091 /Palatino-Bold rf /Fc 135[ 50 83 1[ 61 33 +44 39 1[ 61 55 61 89 33 2[ 33 61 55 1[ 50 61 44 61 50 +10[ 78 8[ 100 9[ 72 12[ 50 1[ 50 50 50 50 2[ 25 4[ 33 +33 40[{ TeXBase1Encoding ReEncodeFont} 30 99.6264 /Palatino-Bold +rf /Fd 134[ 55 55 55 55 55 55 55 55 55 55 55 55 55 55 +55 55 55 55 55 55 55 55 55 55 55 1[ 55 5[ 55 55 55 55 +55 55 55 55 1[ 55 55 55 55 55 55 1[ 55 55 55 55 55 55 +55 55 55 3[ 55 2[ 55 1[ 55 1[ 55 55 55 55 55 55 55 1[ 55 +55 55 1[ 55 55 55 40[{ TeXBase1Encoding ReEncodeFont} 65 +90.9091 /Courier rf /Fe 141[ 36 12[ 44 56 2[ 45 7[ 61 +61 91 1[ 71 56 48 61 2[ 71 76 3[ 30 31 76 1[ 51 56 70 +64 56 71 10[ 45 3[ 45 45 1[ 55 23 4[ 30 30 40[{ +.167 SlantFont TeXBase1Encoding ReEncodeFont} 29 90.9091 +/Palatino-Roman rf +%DVIPSBitmapFont: Ff cmsy10 10.95 1 +/Ff 1 16 df<EB0FFCEB3FFF90B512C0000314F04880488048804880A2481580A3B712C0 +AA6C1580A36C1500A26C5C6C5C6C5C6C5CC614C0013F90C7FCEB0FFC22227BA72D> 15 +D E +%EndDVIPSBitmapFont +/Fg 104[ 91 2[ 45 45 24[ 45 51 47 76 51 55 30 39 36 51 +55 50 53 80 26 51 21 26 53 51 30 44 56 40 50 45 3[ 30 +1[ 30 2[ 61 91 66 71 56 48 61 1[ 55 71 76 86 56 66 30 +31 76 1[ 51 56 70 64 56 71 6[ 23 45 45 45 45 45 45 45 +45 45 45 55 23 30 23 55 1[ 30 30 25 4[ 34 30[ 55 55 2[{ +TeXBase1Encoding ReEncodeFont} 75 90.9091 /Palatino-Roman +rf /Fh 134[ 66 60 100 1[ 73 40 53 47 1[ 73 66 73 106 +2[ 40 40 73 66 47 60 73 53 73 60 11[ 93 80 73 86 1[ 73 +100 100 120 3[ 47 18[ 60 60 60 60 60 60 1[ 35 1[ 40 45[{ +TeXBase1Encoding ReEncodeFont} 38 119.552 /Palatino-Bold +rf /Fi 137[ 50 2[ 39 9[ 28 3[ 39 50 17[ 66 82[{ +TeXBase1Encoding ReEncodeFont} 6 99.6264 /Palatino-Italic +rf /Fj 137[ 56 1[ 32 42 39 2[ 54 58 88 3[ 29 58 55 1[ 48 +61 44 55 50 12[ 61 1[ 67 3[ 83 1[ 61 8[ 71 1[ 78 14[ 50 +50 50 9[ 78 38[{ TeXBase1Encoding ReEncodeFont} 25 99.6264 +/Palatino-Roman rf /Fk 139[ 47 61 57 2[ 78 83 4[ 42 83 +2[ 69 88 64 79 72 12[ 88 4[ 113 119 136 3[ 48 7[ 112 +65[{ TeXBase1Encoding ReEncodeFont} 18 143.462 /Palatino-Roman +rf end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin +%%PaperSize: A4 + +%%EndSetup +%%Page: 1 1 +1 0 bop Fk 728 918 a(The) 36 b(OMNI) g(Thr) m(ead) f(Abstracti) n(on) p +Fj 1293 1176 a(T) -9 b(ristan) 26 b(Richar) n(dson) 1022 +1293 y(A) -7 b(T&T) 24 b(Laboratories) i(Cambridge) p +Fi 1192 1504 a(Revised) p Fj 24 w(November) f(2001) p +Fh 63 1961 a(1) 119 b(Introduction) p Fg 63 2183 a(The) 20 +b(OMNI) h(thr) n(ead) g(abstraction) g(is) h(des) n(igned) f(to) f(pr) n +(ovide) h(a) h(common) f(set) f(of) h(thr) n(ead) g(oper) n(-) 63 +2296 y(ations) h(for) g(use) g(in) h(pr) n(ograms) f(written) f(in) i +(C++.) 29 b(Pr) n(ograms) 22 b(written) g(using) f(the) h(abstraction) +63 2409 y(should) 30 b(be) g(much) i(easier) e(to) g(port) g(betwee) n +(n) h(dif) n(fer) n(ent) g(ar) n(chi) r(tectur) l(es) g(with) g(dif) n +(fer) n(ent) f(un-) 63 2522 y(derlying) 21 b(thr) n(eads) h +(primitives.) 204 2640 y(The) 17 b(pr) n(ogramming) h(interface) g(is) f +(designed) f(to) h(be) h(similar) h(to) e(the) g(C) i(language) e +(interface) 63 2753 y(to) k(POSIX) h(thr) n(eads) f(\(IEEE) g(draft) h +(standar) n(d) f(100) r(3.1c) i(\227) f(pr) n(eviously) g(1003) r(.4a,) +g(often) g(known) 63 2866 y(as) g(\223pthr) n(eads\224) h([POSIX94]\).) +204 2985 y(Much) 18 b(of) f(the) g(abstraction) i(consists) d(of) i +(simple) g(C++) g(object) g(wrappers) e(ar) n(ound) h(pthr) n(ead) 63 +3098 y(calls.) 28 b(Howe) n(ver) 20 b(for) f(some) f(featur) n(es) g +(such) h(as) h(thr) n(ead-spe) n(ci\002c) h(data,) f(a) f(better) f +(interface) i(can) 63 3211 y(be) i(of) n(fer) n(ed) g(because) h(of) f +(the) g(use) g(of) g(C++.) 204 3329 y(Some) 28 b(of) h(the) f(mor) n(e) +h(complex) f(featur) n(es) g(of) h(pthr) n(eads) f(ar) n(e) h(not) f +(suppo) n(rted) g(because) h(of) 63 3442 y(the) e(dif) n(\002culty) i +(of) f(ensuring) g(the) f(same) h(featur) n(es) g(can) h(be) f(of) n +(fer) n(ed) g(on) g(top) g(of) g(other) f(thr) n(ead) 63 +3555 y(sys) n(tems.) f(Such) 17 b(featur) n(es) g(include) h(thr) n +(ead) f(cancell) r(ation) g(and) h(complex) g(schedu) n(ling) h(contr) n +(ol) 63 3668 y(\(thoug) n(h) k(simple) g(thr) n(ead) f(priorities) g +(ar) n(e) h(supp) n(orted\).) 204 3787 y(The) i(abstraction) h(layer) h +(is) f(curr) n(ently) f(implemented) g(for) h(the) f(following) i(ar) n +(chitectur) n(es) 63 3900 y(/) 22 b(thr) n(ead) h(sys) n(tems:) p +Ff 199 4141 a(\017) p Fg 46 w(Solaris) g(2.x) g(using) f(pthr) n(eads) f +(draft) h(10) p Ff 199 4351 a(\017) p Fg 46 w(Solaris) h(2.x) g(using) f +(solaris) g(thr) n(eads) g(\(but) h(pthr) n(eads) e(version) h(is) h +(now) f(standar) n(d\)) p Ff 199 4561 a(\017) p Fg 46 +w(Alpha) h(OSF1) g(using) f(pthr) n(eads) f(draft) i(4) p +Ff 199 4772 a(\017) p Fg 46 w(W) -5 b(indows) 21 b(NT) h(using) g(NT) g +(thr) n(eads) p Ff 199 4982 a(\017) p Fg 46 w(Linux) g(2.x) h(using) f +(Linuxthr) n(ead) g(0.5) h(\(which) h(is) e(based) g(on) h(pthr) n +(eads) e(draft) i(10\)) p Ff 199 5193 a(\017) p Fg 46 +w(Linux) f(2.x) h(using) f(MIT) g(pthr) n(eads) f(\(which) j(is) f +(based) f(on) g(draft) h(8\)) p Ff 199 5403 a(\017) p +Fg 46 w(A) -7 b(TMos) 22 b(using) g(pthr) n(eads) f(draft) h(6) i +(\(but) e(not) g(V) -5 b(irata) 23 b(A) -7 b(TMos\)) 1684 +5652 y(1) p 90 rotate dyy eop +%%Page: 2 2 +2 1 bop Fg 221 249 a(2) p Fe 1797 w(2) 91 b(SYNCHRONI) n(SA) -7 +b(TION) 22 b(OBJECTS) p Fg 362 548 a(See) h(the) p Fd +22 w(omni) n(thre) n(ad.h) p Fg 22 w(header) f(\002le) i(for) f(full) i +(det) n(ail) r(s) e(of) g(the) g(API.) f(The) h(des) n(criptions) 221 +661 y(below) 35 b(assume) g(you) g(have) h(some) e(pr) n(evious) h +(knowled) n(ge) g(of) h(thr) n(eads) n(,) j(mutexes) n(,) g(condi-) 221 +774 y(tion) f(varia) r(bles) g(and) g(semaphor) n(es) n(.) 75 +b(Also) 38 b(r) n(efer) f(to) h(other) f(document) n(ation) i(\([Birr) n +(ell89) r(],) 221 887 y([POSIX94) q(]\)) 22 b(for) g(further) f +(explanation) i(of) f(thes) n(e) g(ideas) g(\(particularly) h +(condition) f(variab) r(les,) 221 1000 y(the) g(use) g(of) g(which) h +(may) g(not) f(be) h(particularly) h(intuitive) f(when) f(\002rst) f +(encounter) n(ed) n(\).) p Fh 221 1299 a(2) 119 b(Synchronisation) 31 +b(objects) p Fg 221 1510 a(Synchr) n(onisation) 26 b(objects) h(ar) n +(e) g(used) e(to) h(synchr) n(onise) g(thr) n(eads) g(within) h(the) f +(same) h(pr) n(ocess) n(.) 221 1623 y(Ther) n(e) j(is) i(no) f(inter) n +(-pr) n(ocess) f(synchr) n(onisation) g(pr) n(ovided.) 53 +b(The) 30 b(synchr) n(onisation) h(objects) 221 1735 +y(pr) n(ovided) 22 b(ar) n(e) h(mutexes) n(,) g(condition) f(variab) r +(les) g(and) h(counting) f(semaphor) n(e) n(s.) p Fc +221 1991 a(2.1) 99 b(Mutex) p Fg 221 2168 a(An) 26 b(object) g(of) h +(typ) n(e) p Fd 26 w(omni) n(_mute) n(x) p Fg 26 w(is) g(use) n(d) f +(for) h(mutual) f(exclusion.) 39 b(It) 26 b(pr) n(ovides) f(two) g(op-) +221 2281 y(erations,) p Fd 37 w(lock\() n(\)) p Fg 35 +w(and) p Fd 35 w(unloc) n(k\(\)) p Fg(.) 64 b(The) 35 +b(alternative) h(names) p Fd 35 w(acq) n(uire\() n(\)) p +Fg 35 w(and) p Fd 35 w(re-) 221 2393 y(leas) n(e\(\)) p +Fg 19 w(can) 21 b(be) f(used) f(if) i(pr) n(eferr) n(ed) n(.) 27 +b(Behaviour) 20 b(is) g(unde\002ne) n(d) g(when) f(a) i(thr) n(ead) f +(attempt) n(s) 221 2506 y(to) 30 b(lock) h(the) e(same) i(mutex) f +(again) h(or) f(when) g(a) h(mutex) f(is) h(locked) e(by) i(one) e(thr) +n(ead) h(and) h(un-) 221 2619 y(locked) 22 b(by) h(a) g(dif) n(fer) n +(ent) f(thr) n(ead.) p Fc 221 2874 a(2.2) 99 b(Condition) 26 +b(V) -11 b(ariable) p Fg 221 3051 a(A) 28 b(condition) f(varia) r(ble) h +(is) g(r) n(epr) n(ese) n(nted) f(by) h(an) p Fd 28 w(omn) n(i_con) n +(diti) n(on) p Fg 27 w(and) g(is) g(used) e(for) i(sig-) 221 +3164 y(nalli) r(ng) 20 b(betwee) n(n) g(thr) n(eads.) 26 +b(A) 21 b(call) h(to) p Fd 19 w(wait\() n(\)) p Fg 20 +w(causes) e(a) h(thr) n(ead) e(to) h(wait) h(on) f(the) f(condition) 221 +3277 y(varia) r(ble.) 45 b(A) 28 b(call) i(to) p Fd 27 +w(sign) n(al\(\)) p Fg 27 w(wakes) d(up) h(at) g(least) g(one) f(thr) n +(ead) h(if) h(any) f(ar) n(e) g(waiting.) 45 b(A) 221 +3390 y(call) 25 b(to) p Fd 22 w(bro) n(adca) n(st\(\)) p +Fg 21 w(wakes) d(up) g(all) i(thr) n(eads) e(waiting) h(on) f(the) g +(condition) g(varia) r(ble.) 362 3503 y(When) 30 b(constr) o(ucte) n +(d,) i(a) e(pointer) f(to) h(an) p Fd 30 w(omni) n(_mute) n(x) p +Fg 30 w(must) f(be) h(given.) 50 b(A) 30 b(condition) 221 +3616 y(varia) r(ble) p Fd 33 w(wait\() n(\)) p Fg 33 +w(has) j(an) h(implic) r(it) f(mutex) p Fd 33 w(unlo) n(ck\(\)) p +Fg 32 w(and) p Fd 33 w(lock) n(\(\)) p Fg 33 w(ar) n(ound) g(it.) 60 +b(The) 221 3729 y(link) 30 b(between) f(condition) g(varia) r(ble) h +(and) g(mutex) f(lasts) g(for) h(the) f(lifetime) i(of) e(the) g +(condition) 221 3842 y(varia) r(ble) c(\(unlike) h(pthr) n(eads) e +(wher) n(e) g(the) h(link) h(is) f(only) g(for) g(the) g(duration) f +(of) i(the) e(wait\).) 37 b(The) 221 3955 y(same) 23 +b(mutex) f(may) h(be) f(used) f(with) i(several) f(condition) h(variab) +r(les.) 362 4068 y(A) c(wait) g(with) g(a) g(timeout) f(can) i(be) e +(achieved) h(by) g(call) r(ing) p Fd 19 w(tim) n(ed_w) n(ait\(\)) p +Fg -2 w(.) 27 b(This) 18 b(is) h(given) 221 4181 y(an) 27 +b(absolute) e(time) h(to) f(wait) h(until.) 38 b(The) 26 +b(r) n(outine) p Fd 25 w(omn) n(i_thr) n(ead:) n(:get_) n(time) n(\(\)) +p Fg 25 w(can) h(be) 221 4293 y(used) 21 b(to) h(turn) g(a) h(r) n +(elativ) r(e) f(time) g(into) h(an) g(absolute) f(time.) p +Fd 28 w(tim) n(ed_wa) n(it\(\)) p Fg 21 w(r) n(eturns) p +Fd 21 w(true) p Fg 21 w(if) 221 4406 y(the) 27 b(condition) h(was) g +(signalled,) p Fd 29 w(false) p Fg 26 w(if) h(the) f(time) g(expir) n +(ed) f(befor) n(e) g(the) h(condition) f(vari) r(-) 221 +4519 y(able) d(was) e(signalled.) p Fc 221 4774 a(2.3) 99 +b(Counting) 26 b(semaphores) p Fg 221 4951 a(An) p Fd +21 w(omn) n(i_sem) n(apho) n(re) p Fg 20 w(is) 21 b(a) h(counting) e +(semaphor) n(e) n(.) 28 b(When) 20 b(cr) n(eated) g(it) h(is) g(given) g +(an) g(initial) 221 5064 y(unsigned) j(intege) n(r) i(value.) 36 +b(When) p Fd 25 w(wai) n(t\(\)) p Fg 24 w(is) 26 b(called,) g(the) f +(value) h(is) f(decr) n(emente) n(d) g(if) h(non-) 221 +5177 y(zer) n(o.) 43 b(If) 27 b(the) g(value) h(is) f(zer) n(o) h(then) +f(the) f(thr) n(ead) h(blocks) h(instead.) 41 b(When) p +Fd 27 w(post) n(\(\)) p Fg 27 w(is) 27 b(cal) r(led,) 221 +5290 y(if) h(any) g(thr) n(eads) e(ar) n(e) i(blocked) f(in) p +Fd 27 w(wait\() n(\)) p Fg(,) h(exactly) f(one) g(thr) n(ead) g(is) g +(woken.) 41 b(If) 27 b(no) g(thr) n(eads) 221 5403 y(wer) n(e) 22 +b(blocked) g(then) g(the) g(value) h(of) g(the) e(semaphor) n(e) h(is) h +(incr) n(emented.) p 90 rotate dyy eop +%%Page: 3 3 +3 2 bop Fg 3306 249 a(3) 204 548 y(If) 27 b(a) h(thr) n(ead) e(cal) r +(ls) p Fd 27 w(try) n(_wait) n(\(\)) p Fg(,) h(then) g(the) f(thr) n +(ead) g(won't) h(block) h(if) f(the) g(semaphor) n(e's) 63 +661 y(value) c(is) g(0,) g(r) n(eturning) p Fd 21 w(false) p +Fg 21 w(instead.) 204 777 y(Ther) n(e) f(is) g(no) h(way) f(of) h +(query) n(ing) g(the) f(value) h(of) g(the) f(semaphor) n(e) n(.) p +Fh 63 1095 a(3) 119 b(Thread) 29 b(object) p Fg 63 1313 +a(A) 23 b(thr) n(ead) g(is) h(r) n(epr) n(ese) n(nted) e(by) i(an) p +Fd 24 w(omni) n(_thr) n(ead) p Fg 23 w(object.) 30 b(Ther) n(e) 23 +b(ar) n(e) h(br) n(oadly) g(two) e(dif) n(fer) n(-) 63 +1426 y(ent) f(ways) i(in) g(which) g(it) g(can) g(be) g(used) n(.) 204 +1542 y(The) 28 b(\002rst) g(way) h(is) h(simply) f(to) f(cr) n(eate) h +(an) p Fd 30 w(omn) n(i_thr) n(ead) p Fg 28 w(object,) h(giving) g(a) f +(particula) r(r) 63 1655 y(function) c(which) h(the) e(thr) n(ead) h +(should) f(execute) n(.) 36 b(This) 25 b(is) g(like) g(the) g(POSIX) f +(\(or) i(any) f(other) n(\)) h(C) 63 1768 y(language) c(interface.) 204 +1884 y(The) k(second) f(method) h(of) h(use) e(is) i(to) f(cr) n(eate) h +(a) g(new) g(class) g(which) g(inherits) f(fr) n(om) p +Fd 28 w(omn) n(i_) 63 1997 y(thr) n(ead) p Fg(.) 50 b(In) 31 +b(this) f(case) g(the) g(thr) n(ead) g(will) i(execute) d(the) p +Fd 29 w(run\(\)) p Fg 29 w(member) h(function) h(of) f(the) 63 +2109 y(new) 22 b(class.) 29 b(One) 23 b(advantage) g(of) g(this) g +(scheme) f(is) h(that) g(thr) n(ead-speci\002c) g(data) g(can) h(be) f +(imple-) 63 2222 y(mented) e(simply) h(by) h(having) g(data) g(members) +f(of) h(the) f(new) g(class.) 204 2339 y(When) f(constr) o(ucted) g(a) i +(thr) n(ead) f(is) g(in) h(the) e("new") h(state) f(and) h(has) g(not) g +(actuall) r(y) g(starte) n(d.) 28 b(A) 63 2451 y(call) j(to) p +Fd 29 w(sta) n(rt\(\)) p Fg 28 w(causes) e(the) g(thr) n(ead) g(to) g +(begin) g(executing.) 47 b(A) 29 b(static) h(member) f(function) p +Fd 63 2564 a(cre) n(ate\() n(\)) p Fg 32 w(is) j(pr) n(ovided) f(to) g +(constr) o(uct) g(and) g(start) g(a) i(thr) n(ead) e(in) h(a) g(single) +g(call.) 57 b(A) 31 b(thr) n(ead) 63 2677 y(exits) 21 +b(by) i(call) r(ing) p Fd 22 w(exit\() n(\)) p Fg 22 +w(or) g(by) f(r) n(eturning) g(fr) n(om) h(the) f(thr) n(ead) g +(function.) 204 2793 y(Thr) n(eads) 27 b(can) j(be) e(either) g +(detached) f(or) h(undetached) n(.) 46 b(Detached) 28 +b(thr) n(eads) g(ar) n(e) h(thr) n(eads) 63 2906 y(for) h(which) i(all) +g(state) e(will) i(be) f(lost) f(upon) g(exit.) 52 b(Other) 30 +b(thr) n(eads) g(cannot) h(dete) n(rmine) g(when) 63 +3019 y(a) e(detached) f(thr) n(ead) h(will) h(disappear) -7 +b(,) 31 b(and) e(ther) n(efor) n(e) f(should) g(not) h(attempt) f(to) g +(access) h(the) 63 3132 y(thr) n(ead) 23 b(object) g(unless) f(some) h +(explicit) h(synchr) n(onisation) f(with) g(the) g(detached) f(thr) n +(ead) h(guar) n(-) 63 3245 y(antees) e(that) h(it) h(still) g(exists.) +204 3361 y(Undet) n(ached) 33 b(thr) n(eads) f(ar) n(e) i(thr) n(eads) e +(for) h(which) g(storage) f(is) h(not) f(r) n(eclai) r(med) g(until) i +(an-) 63 3474 y(othe) n(r) g(thr) n(ead) g(waits) g(for) g(its) g +(termination) g(by) g(call) r(ing) p Fd 34 w(joi) n(n\(\)) p +Fg(.) 61 b(An) 34 b(exit) g(value) h(can) g(be) 63 3587 +y(passe) n(d) 23 b(fr) n(om) g(an) g(undet) n(ached) g(thr) n(ead) f +(to) g(the) g(thr) n(ead) g(which) h(joins) g(it.) 204 +3703 y(Detached) 31 b(/) h(undetached) e(thr) n(eads) h(ar) n(e) i +(distinguish) n(ed) f(on) f(cr) n(eation) h(by) g(the) f(type) g(of) 63 +3816 y(function) 24 b(they) e(execute.) 30 b(Undetached) 22 +b(thr) n(eads) h(execute) g(a) h(function) g(which) g(has) g(a) p +Fd 25 w(voi) n(d*) p Fg 63 3929 a(r) n(eturn) c(typ) n(e,) h(wher) n +(eas) f(detached) f(thr) n(eads) h(execute) f(a) j(function) f(which) g +(has) g(a) p Fd 21 w(void) p Fg 19 w(r) n(eturn) 63 4042 +y(typ) n(e.) 52 b(Unfortunate) n(ly) 31 b(C++) g(member) g(functions) f +(ar) n(e) h(not) f(allowed) g(to) g(be) h(distingu) n(ished) 63 +4155 y(simply) 26 b(by) h(their) f(r) n(eturn) g(type) n(.) 40 +b(Thus) 26 b(in) h(the) f(case) h(of) g(a) g(derived) f(class) h(of) p +Fd 26 w(omni_) n(thre) n(ad) p Fg 63 4268 a(which) 20 +b(needs) e(an) j(undet) n(ached) f(thr) n(ead,) g(the) f(member) h +(function) g(execute) n(d) g(by) g(the) f(thr) n(ead) g(is) 63 +4380 y(called) p Fd 19 w(run_u) n(ndet) n(ache) n(d\(\)) p +Fg 18 w(rather) f(than) p Fd 19 w(run\() n(\)) p Fg(,) h(and) g(it) g +(is) g(started) e(by) i(calli) r(ng) p Fd 18 w(star) n(t_) 63 +4493 y(und) n(etac) n(hed\(\)) p Fg 21 w(instead) j(of) p +Fd 22 w(start) n(\(\)) p Fg(.) 204 4610 y(The) i(abstraction) i(curr) n +(ently) e(suppo) n(rts) h(thr) n(ee) f(priorities) g(of) h(thr) n(ead,) +g(but) g(no) g(guarantee) 63 4722 y(is) 33 b(made) g(of) h(how) f(this) +g(will) h(af) n(f) r(ect) f(underlying) f(thr) n(ead) h(scheduling.) 59 +b(The) 33 b(thr) n(ee) f(priori-) 63 4835 y(ties) 18 +b(ar) n(e) p Fd 20 w(PRIO) n(RITY) n(_LOW) p Fg(,) p +Fd 18 w(PRIO) n(RITY) n(_NOR) n(MAL) p Fg 19 w(and) p +Fd 19 w(PRIO) n(RITY) n(_HIG) n(H) p Fg(.) h(By) g(default) g(all) 63 +4948 y(thr) n(eads) i(r) o(un) i(at) p Fd 23 w(PRIO) n(RITY) n(_NORM) n +(AL) p Fg(.) f(A) g(dif) n(fer) n(ent) h(priority) f(can) i(be) e +(speci\002ed) g(on) g(thr) n(ead) 63 5061 y(cr) n(eation,) h(or) f +(while) h(the) f(thr) n(ead) g(is) h(r) o(unning) g(using) p +Fd 22 w(set_) n(prio) n(rity\() n(\).) p Fg 28 w(A) g(thr) n(ead's) f +(cur) n(-) 63 5174 y(r) n(ent) g(priority) g(is) g(r) n(eturned) f(by) p +Fd 23 w(pri) n(ority) n(\(\)) p Fg(.) 204 5290 y(Other) d(functions) g +(pr) n(ovided) g(ar) n(e) p Fd 19 w(sel) n(f\(\)) p Fg +18 w(which) h(r) n(eturns) e(the) h(calli) r(ng) g(thr) n(ead's) p +Fd 18 w(omn) n(i_) 63 5403 y(thr) n(ead) p Fg 36 w(object,) p +Fd 40 w(yie) n(ld\(\)) p Fg 35 w(which) 38 b(r) n(eques) n(ts) e(that) h +(other) e(thr) n(eads) h(be) h(allowed) g(to) f(r) o(un,) p +90 rotate dyy eop +%%Page: 4 4 +4 3 bop Fg 221 249 a(4) p Fe 1367 w(6) 91 b(THRE) n(ADED) 23 +b(I/O) g(SHUTDOWN) f(FOR) g(UNIX) p Fd 221 548 a(id\(\)) p +Fg 27 w(which) 29 b(r) n(eturns) e(an) i(intege) n(r) g(id) f(for) h +(the) e(thr) n(ead) h(for) g(use) g(in) h(debug) n(ging,) p +Fd 29 w(state) n(\(\)) p Fg(,) p Fd 221 661 a(slee) n(p\(\)) p +Fg 22 w(and) p Fd 22 w(get_t) n(ime\() n(\)) p Fg(.) p +Fh 221 953 a(4) 119 b(Per) n(-threa) n(d) 30 b(data) p +Fg 221 1164 a(omnithr) n(ead) 22 b(suppo) n(rts) g(per) n(-thr) n(ead) f +(data,) h(via) i(member) e(functions) f(of) i(the) p +Fd 21 w(omni) n(_thr) n(ead) p Fg 221 1277 a(object.) 362 +1390 y(First,) d(you) g(must) h(allocate) h(a) f(key) f(for) g(with) h +(the) p Fd 20 w(omni) n(_thre) n(ad::) n(allo) n(cate_) n(key\() n(\)) p +Fg 221 1502 a(function.) 28 b(Then,) 21 b(any) h(object) g(whose) f +(class) h(is) g(derived) f(fr) n(om) p Fd 23 w(omni) n(_thr) n(ead::) n +(valu) n(e_t) p Fg 221 1615 a(can) 27 b(be) f(stor) n(e) n(d) g(using) f +(the) p Fd 26 w(set) n(_val) n(ue\(\)) p Fg 25 w(function.) 38 +b(V) -8 b(alues) 25 b(ar) n(e) h(r) n(etrieved) f(or) h(r) n(emoved) 221 +1728 y(with) p Fd 23 w(get) n(_valu) n(e\(\)) p Fg 21 +w(and) p Fd 23 w(remo) n(ve_v) n(alue\() n(\)) p Fg 22 +w(r) n(espectively) -10 b(.) 362 1841 y(When) 23 b(the) g(thr) n(ead) g +(exits,) g(all) i(per) n(-thr) n(ead) e(data) h(is) g(delet) n(ed) f +(\(hence) h(the) e(base) i(class) g(with) 221 1954 y(virtual) g(dest) n +(r) o(uctor\).) 362 2067 y(Note) 17 b(that) i(the) f(per) n(-thr) n +(ead) f(data) i(functions) f(ar) n(e) p Fb 19 w(not) p +Fg 18 w(thr) n(ead) g(safe,) i(so) d(although) i(you) e(can) 221 +2180 y(access) 29 b(one) e(thr) n(ead's) h(storage) f(fr) n(om) i +(another) f(thr) n(ead,) h(ther) n(e) e(is) i(no) f(concurr) n(ency) g +(contr) n(ol.) 221 2293 y(Unless) j(you) g(r) n(eall) r(y) h(know) f +(what) h(you) f(ar) n(e) i(doing,) g(it) g(is) f(best) f(to) h(only) g +(access) g(per) n(-thr) n(ead) 221 2406 y(data) 23 b(fr) n(om) g(the) f +(thr) n(ead) g(it) h(is) g(attached) f(to.) p Fh 221 +2698 a(5) 119 b(Using) 31 b(OMNI) d(threads) h(in) h(your) g(program) p +Fg 221 2909 a(Obvi) r(ously) 16 b(you) h(need) g(to) g(include) h(the) p +Fd 16 w(omnit) n(hrea) n(d.h) p Fg 17 w(header) e(\002le) i(in) g(your) +f(sour) n(ce) g(code,) 221 3021 y(and) 25 b(link) g(in) h(the) e +(omnithr) n(ead) g(libra) r(ry) g(with) h(your) f(execut) n(abl) r(e.) +34 b(Because) 23 b(ther) n(e) h(is) h(a) g(single) p +Fd 221 3134 a(omni) n(threa) n(d.h) p Fg 30 w(for) 32 +b(all) h(platforms,) h(certain) e(pr) n(epr) n(oces) n(sor) f +(de\002nes) f(must) h(be) g(given) h(as) 221 3247 y(compiler) 25 +b(options) n(.) 33 b(The) 23 b(easiest) g(way) h(to) g(do) f(this) h +(is) g(to) g(stud) n(y) g(the) g(make\002les) f(given) h(in) h(the) 221 +3360 y(examples) i(pr) n(ovided) g(with) g(this) g(distribution.) 42 +b(If) 27 b(you) g(ar) n(e) g(to) g(include) h(OMNI) f(thr) n(eads) g +(in) 221 3473 y(your) 18 b(own) g(development) g(envir) n(onment,) h +(thes) n(e) g(ar) n(e) g(the) f(necessary) g(pr) n(epr) n(oce) n(ssor) g +(de\002nes) n(:) p 362 3567 3287 4 v 360 3680 4 113 v +412 3646 a(Platform) p 1312 3680 V 599 w(Pr) n(epr) n(ocess) n(or) 23 +b(De\002nes) p 3648 3680 V 362 3683 3287 4 v 362 3700 +V 360 3813 4 113 v 412 3779 a(Sun) f(Solaris) h(2.x) p +1312 3813 V Fd 365 w(-D__) n(suno) n(s__) 54 b(-D_) n(_spa) n(rc__) f +(-D__) n(OSVER) n(SION) n(__=5) p 3648 3813 V 360 3926 +V 1312 3926 V 1363 3892 a(-DSV) n(R4) h(-DUs) n(ePth) n(read) f(-D_R) n +(EENT) n(RANT) p 3648 3926 V 362 3929 3287 4 v 360 4042 +4 113 v Fg 412 4008 a(x86) 24 b(Linux) e(2.0) p 1312 +4042 V Fd 418 w(-D__) n(linu) n(x__) 54 b(-D_) n(_i86) n(__) g(-D__) n +(OSVE) n(RSION) n(__=2) p 3648 4042 V 360 4155 V Fg 412 +4121 a(with) 23 b(linuxthr) n(eads) f(0.5) p 1312 4155 +V Fd 100 w(-D_R) n(EENT) n(RANT) p 3648 4155 V 362 4158 +3287 4 v 360 4271 4 113 v Fg 412 4237 a(Digital) i(Unix) f(3.2) p +1312 4271 V Fd 320 w(-D__) n(osf1) n(__) 54 b(-D__) n(alph) n(a__) g +(-D_) n(_OSV) n(ERSIO) n(N__=) n(3) p 3648 4271 V 360 +4384 V 1312 4384 V 1363 4350 a(-D_R) n(EENT) n(RANT) p +3648 4384 V 362 4387 3287 4 v 360 4500 4 113 v Fg 412 +4466 a(W) -5 b(indows) 22 b(NT) p 1312 4500 V Fd 411 +w(-D__) n(NT__) 53 b(-MD) p 3648 4500 V 362 4503 3287 +4 v Fh 221 4740 a(6) 119 b(Threaded) 29 b(I/O) g(shutdown) h(for) g +(Unix) p Fg 221 4951 a(or) -7 b(,) 20 b(how) e(one) g(thr) n(ead) h +(shou) n(ld) h(tell) f(another) f(thr) n(ead) g(to) h(shut) f(down) g +(when) g(it) h(might) g(be) g(doing) 221 5064 y(a) k(blocking) g(cal) r +(l) g(on) f(a) h(socket) n(.) p Fb 362 5177 a(If) h(you) e(are) i +(using) e(omniOR) n(B,) h(you) e(don') n(t) i(need) g(to) g(worry) f +(about) g(all) i(this,) f(since) h(om-) 221 5290 y(niORB) i(does) h(it) +h(for) f(you) n(.) p Fg 41 w(This) g(section) f(is) h(only) g(r) n +(elevant) g(if) h(you) e(ar) n(e) h(using) f(omnithr) n(ead) 221 +5403 y(in) d(your) f(own) g(socket) n(-based) h(pr) n(ogramming.) k(It) +22 b(is) h(also) g(serious) n(ly) g(out) f(of) h(date.) p +90 rotate dyy eop +%%Page: 5 5 +5 4 bop Fe 63 249 a(6.1) 91 b(r) n(ead\(\)) p Fg 2800 +w(5) 204 548 y(Unfortunate) n(ly) 35 b(ther) n(e) e(doe) n(sn't) h +(seem) f(to) h(be) g(a) h(standar) n(d) e(way) i(of) f(doing) f(this) h +(which) 63 661 y(works) 19 b(acr) n(oss) i(all) i(Unix) e(syst) n(ems.) +27 b(I) 21 b(have) g(investigated) f(the) h(behaviour) g(of) g(Solaris) +h(2.5) g(and) 63 774 y(Digital) k(Unix) g(3.2.) 36 b(On) 26 +b(Digital) h(Unix) e(everyth) n(ing) h(is) f(\002ne,) g(as) h(the) e +(obvious) h(method) f(using) 63 887 y(shutd) n(own\(\)) 32 +b(seems) f(to) h(work) f(OK.) h(Unfortunately) f(on) h(Solaris) h(shut) +n(down) f(can) h(only) f(be) 63 1000 y(used) 25 b(on) h(a) h(connected) +e(socke) n(t,) i(so) f(we) g(need) f(devious) h(means) g(to) g(get) f +(ar) n(ound) h(this) g(lim) r(ita-) 63 1112 y(tion.) h(The) 22 +b(details) g(ar) n(e) h(summarised) g(below:) p Fc 63 +1429 a(6.1) 99 b(read\(\)) p Fg 63 1627 a(Thr) n(ead) 28 +b(A) h(is) g(in) h(a) g(loop,) g(doing) p Fd 28 w(rea) n(d\(soc) n(k\)) +p Fg(,) g(pr) n(ocess) n(ing) f(the) g(data,) h(then) f(going) f(back) +63 1739 y(into) 22 b(the) g(r) n(ead.) 204 1862 y(Thr) n(ead) 30 +b(B) h(comes) f(along) h(and) g(wants) f(to) g(shut) g(it) h(down) f +(\227) h(it) g(can't) g(cancel) h(thr) n(ead) f(A) 63 +1975 y(since) 21 b(\(i\)) h(working) e(out) g(how) g(to) h(clean) h(up) +e(accor) n(ding) i(to) e(wher) n(e) g(A) h(is) g(in) h(its) f(loop) f +(is) h(a) h(night-) 63 2088 y(mar) n(e,) h(and) f(\(ii\)) i(this) f +(isn't) f(ava) r(ilabl) r(e) g(in) h(omnithr) n(ead) f(anyway) -10 +b(.) 204 2211 y(On) 23 b(Solaris) g(2.5) g(and) g(Digital) h(Unix) f +(3.2) g(the) f(following) h(strate) n(gy) f(works:) 204 +2334 y(Thr) n(ead) g(B) g(does) p Fd 21 w(shut) n(down\() n(sock) n +(,2\)) p Fg(.) 204 2457 y(At) g(this) g(point) h(thr) n(ead) f(A) g(is) +h(either) f(blocked) g(inside) p Fd 23 w(rea) n(d\(so) n(ck\)) p +Fg(,) g(or) g(is) h(elsewhe) n(r) n(e) g(in) 63 2570 +y(the) 18 b(loop.) 26 b(If) 18 b(the) g(former) h(then) f(r) n(ead) h +(will) h(r) n(eturn) e(0,) i(indicating) f(that) g(the) f(socke) n(t) h +(is) g(closed.) 26 b(If) 63 2683 y(the) 21 b(latter) h(then) f +(eventually) h(thr) n(ead) g(A) g(will) i(call) p Fd +24 w(rea) n(d\(so) n(ck\)) p Fg 21 w(and) f(then) e(this) h(will) h(r) n +(eturn) 63 2796 y(0.) 28 b(Thr) n(ead) 22 b(A) h(should) p +Fd 21 w(clos) n(e\(soc) n(k\)) p Fg(,) f(do) g(any) g(other) g(tidying) +f(up,) h(and) h(exit.) 204 2919 y(If) 34 b(ther) n(e) g(is) h(another) f +(point) g(in) h(the) e(loop) i(that) f(thr) n(ead) g(A) h(can) g(block) +g(then) f(obviously) 63 3032 y(thr) n(ead) 19 b(B) h(needs) f(to) h(be) +g(awar) n(e) h(of) f(this) g(and) g(be) h(able) g(to) e(wake) h(it) h +(up) f(in) g(the) g(appr) n(opriate) g(way) 63 3145 y(fr) n(om) j(that) +f(point.) p Fc 63 3462 a(6.2) 99 b(accept\(\)) p Fg 63 +3659 a(Again) 25 b(thr) n(ead) g(A) h(is) f(in) h(a) g(loop,) g(this) f +(time) h(doing) e(an) i(acc) r(ept) e(on) h(listenSock,) g(dealing) h +(with) 63 3772 y(a) d(new) f(connection) g(and) h(going) e(back) j +(into) e(accept.) 28 b(Thr) n(ead) 22 b(B) g(wants) h(to) f(cancel) h +(it.) 204 3895 y(On) g(Digital) h(Unix) f(3.2) g(the) f(strateg) n(y) g +(is) h(identical) h(to) e(that) g(for) h(r) n(ead:) 204 +4018 y(Thr) n(ead) 39 b(B) g(does) p Fd 38 w(shut) n(down) n(\(list) n +(enSo) n(ck,2) n(\)) p Fg(.) 79 b(Wher) n(ever) 38 b(thr) n(ead) h(A) h +(is) f(in) h(the) 63 4131 y(loop,) i(eventually) c(it) h(will) h(r) n +(eturn) p Fd 38 w(ECONN) n(ABOR) n(TED) p Fg 38 w(fr) n(om) f(the) f +(accept) h(call) r(.) 76 b(It) 39 b(shou) n(ld) p Fd +63 4244 a(clo) n(se\(l) n(isten) n(Sock) n(\)) p Fg(,) 22 +b(tidy) g(up) g(as) h(necessary) e(and) i(exit.) 204 +4367 y(On) 30 b(Solaris) f(2.5) i(thr) n(ead) e(B) g(can't) h(do) p +Fd 29 w(shu) n(tdow) n(n\(lis) n(tenS) n(ock,2) n(\)) p +Fg 29 w(\227) g(this) f(r) n(eturns) p Fd 63 4480 a(ENO) n(TCON) n(N) p +Fg(.) 22 b(Instead) f(the) h(following) h(strateg) n(y) g(can) g(be) g +(used) n(:) 204 4603 y(First) 35 b(thr) n(ead) h(B) g(set) n(s) g(some) +f(sort) g(of) h("shutdo) n(wn) g(\003ag") g(associated) g(with) g +(listenSock.) 63 4716 y(Then) 31 b(it) h(does) p Fd 30 +w(gets) n(ocka) n(ddr\(l) n(iste) n(nSock) n(\)) p Fg +32 w(to) f(\002nd) g(out) g(which) i(port) e(listenSock) f(is) 63 +4828 y(on) 18 b(\(or) h(knows) e(alr) n(eady\),) j(sets) d(up) h(a) h +(socket) e(dummySock,) i(doe) n(s) p Fd 19 w(con) n(nect) n(\(dumm) n +(ySoc) n(k,) 63 4941 y(thi) n(s) 54 b(host,) f(por) n(t\)) p +Fg 22 w(and) 23 b(\002nally) g(does) p Fd 21 w(clos) n(e\(dum) n(mySo) n +(ck\)) p Fg(.) 204 5064 y(Wher) n(ever) 16 b(thr) n(ead) h(A) g(is) g +(in) h(the) e(loop,) h(eventually) g(it) h(will) g(call) p +Fd 19 w(acce) n(pt\(li) n(sten) n(Sock) n(\)) p Fg(.) 63 +5177 y(This) 35 b(will) j(r) n(eturn) d(successfully) g(with) h(a) h +(new) e(socket,) j(say) e(connSock.) 67 b(Thr) n(ead) 36 +b(A) f(then) 63 5290 y(checks) 20 b(to) h(see) f(if) i(the) f("shutd) n +(own) g(\003ag") h(is) f(set.) 26 b(If) c(not,) e(then) h(it's) g(a) h +(normal) g(connection.) 27 b(If) 21 b(it) 63 5403 y(is) h(set,) g(then) +f(thr) n(ead) h(A) h(closes) f(listenSock) f(and) i(connSock,) e +(tidies) h(up) g(and) h(exits.) p 90 rotate dyy eop +%%Page: 6 6 +6 5 bop Fg 221 249 a(6) p Fe 1367 w(6) 91 b(THRE) n(ADED) 23 +b(I/O) g(SHUTDOWN) f(FOR) g(UNIX) p Fc 221 548 a(6.3) 99 +b(write\(\)) p Fg 221 768 a(Thr) n(ead) 19 b(A) f(may) h(be) g(blocked) +f(in) i(write,) f(or) f(about) h(to) f(go) g(in) h(to) g(a) g(poten) n +(tiall) r(y-blocking) g(write.) 221 881 y(Thr) n(ead) j(B) h(wants) f +(to) g(shut) f(it) i(down.) 362 1016 y(On) g(Solaris) g(2.5:) 362 +1150 y(Thr) n(ead) f(B) h(doe) n(s) p Fd 23 w(shu) n(tdown) n(\(soc) n +(k,2\)) p Fg -2 w(.) 362 1285 y(If) c(thr) n(ead) f(A) h(is) g(alr) n +(eady) g(in) p Fd 20 w(wri) n(te\(s) n(ock\)) p Fg 17 +w(then) f(it) h(will) i(r) n(eturn) d(with) p Fd 18 w(ENXIO) p +Fg -2 w(.) h(If) g(thr) n(ead) 221 1398 y(A) k(calls) h(write) e(after) +g(thr) n(ead) g(B) h(calls) h(shut) n(down) e(this) g(will) i(r) n +(eturn) p Fd 22 w(EIO) p Fg(.) 362 1532 y(On) f(Digital) h(Unix) f +(3.2:) 362 1666 y(Thr) n(ead) f(B) h(doe) n(s) p Fd 23 +w(shu) n(tdown) n(\(soc) n(k,2\)) p Fg -2 w(.) 362 1801 +y(If) h(thr) n(ead) f(A) g(is) h(alr) n(eady) g(in) p +Fd 24 w(writ) n(e\(so) n(ck\)) p Fg 23 w(then) e(it) i(will) h(r) n +(eturn) e(the) f(number) i(of) f(bytes) 221 1914 y(written) 31 +b(befor) n(e) h(it) g(became) g(blocked.) 55 b(A) 32 +b(subseq) n(uent) f(cal) r(l) h(to) f(write) h(will) h(then) e(gene) n +(rate) p Fd 221 2027 a(SIGP) n(IPE) p Fg 22 w(\(or) p +Fd 22 w(EPIP) n(E) p Fg 23 w(will) 24 b(be) e(r) n(eturned) f(if) p +Fd 24 w(SIG) n(PIPE) p Fg 21 w(is) i(ignor) n(ed) e(by) i(the) f(thr) n +(ead\).) p Fc 221 2413 a(6.4) 99 b(connect\(\)) p Fg +221 2634 a(Thr) n(ead) 30 b(A) f(may) h(be) g(blocked) f(in) i +(connect,) g(or) e(about) h(to) f(go) g(in) i(to) e(a) h(poten) n +(tiall) r(y-blocking) 221 2747 y(connect.) d(Thr) n(ead) c(B) f(wants) g +(to) g(shut) g(it) g(down.) 362 2881 y(On) h(Digital) h(Unix) f(3.2:) +362 3016 y(Thr) n(ead) f(B) h(doe) n(s) p Fd 23 w(shu) n(tdown) n +(\(soc) n(k,2\)) p Fg -2 w(.) 362 3150 y(If) j(thr) n(ead) f(A) g(is) h +(alr) n(eady) g(in) p Fd 26 w(conn) n(ect\() n(sock) n(\)) p +Fg 26 w(then) e(it) i(will) h(r) n(eturn) e(a) h(successful) f(con-) 221 +3263 y(nection.) 54 b(Subsequ) n(ent) 31 b(r) n(eading) g(or) g +(writing) g(will) i(show) d(that) i(the) e(socket) g(has) h(been) g +(shut) 221 3376 y(down) 22 b(\(i.e.) 28 b(r) n(ead) 23 +b(r) n(eturns) e(0,) i(write) f(generate) n(s) p Fd 23 +w(SIG) n(PIPE) p Fg 21 w(or) g(r) n(eturns) p Fd 22 w(EPI) n(PE) p +Fg(\).) g(If) h(thr) n(ead) f(A) 221 3489 y(call) r(s) g(connect) g +(after) h(thr) n(ead) f(B) g(call) r(s) g(shutdo) n(wn) h(this) f(will) +i(r) n(eturn) p Fd 22 w(EIN) n(VAL) p Fg(.) 362 3623 +y(On) f(Solaris) g(2.5:) 362 3758 y(Ther) n(e) 35 b(is) h(no) f(way) g +(to) g(wake) g(up) g(a) h(thr) n(ead) f(which) h(is) g(blocked) f(in) h +(connect.) 66 b(Inst) n(ead) 221 3871 y(Solaris) 33 b(for) n(ces) g(us) +f(thr) n(ough) g(a) i(ridiculous) f(pr) n(oced) n(ur) n(e) g(whichever) +g(way) g(we) f(try) g(it.) 59 b(One) 221 3984 y(way) 23 +b(is) f(this:) 362 4118 y(First) d(thr) n(ead) h(A) g(cr) n(eates) f(a) +h(pipe) g(in) g(addition) g(to) f(the) g(socket) n(.) 27 +b(Instead) 19 b(of) h(shut) n(ting) g(down) 221 4231 +y(the) i(socket) n(,) h(thr) n(ead) f(B) g(simply) h(writes) e(a) i +(byte) f(to) g(the) g(pipe.) 362 4365 y(Thr) n(ead) 17 +b(A) g(meanwhile) h(set) n(s) f(the) g(socke) n(t) g(to) g +(non-blocking) g(mode) f(using) p Fd 17 w(fcn) n(tl\(s) n(ock,) 221 +4478 y(F_SE) n(TFL,) 53 b(O_NO) n(NBLO) n(CK\)) p Fg(.) 26 +b(Then) h(it) g(cal) r(ls) g(connect) g(on) g(the) f(socket) g(\227) h +(this) g(will) i(r) n(eturn) p Fd 221 4591 a(EINP) n(ROGRE) n(SS) p +Fg(.) k(Then) h(it) h(must) e(cal) r(l) p Fd 35 w(sel) n(ect\() n(\)) p +Fg(,) k(waiting) e(for) f(either) g(sock) g(to) f(become) 221 +4704 y(writable) 39 b(or) f(for) h(the) e(pipe) h(to) g(become) g(r) n +(eadable.) 75 b(If) 39 b(select) e(r) n(eturns) g(that) i(just) e(sock) +h(is) 221 4817 y(writable) 30 b(then) f(the) g(connection) g(has) h +(succeede) n(d.) 49 b(It) 29 b(then) g(need) n(s) h(to) f(set) f(the) h +(socket) f(back) 221 4930 y(to) i(blocking) h(mode) f(using) p +Fd 30 w(fcnt) n(l\(so) n(ck,) 54 b(F_S) n(ETFL) n(,) h(0\)) p +Fg(.) c(If) 31 b(instead) e(select) h(r) n(eturns) 221 +5043 y(that) 23 b(the) e(pipe) h(is) h(r) n(eadable,) g(thr) n(ead) f +(A) h(closes) e(the) h(socket) n(,) h(tidies) f(up) g(and) h(exits.) 362 +5177 y(An) g(alternative) h(method) e(is) i(similar) h(but) e(to) g +(use) f(polling) i(instead) e(of) i(the) e(pipe.) 29 +b(Thr) n(ead) 221 5290 y(B) 24 b(justs) e(sets) g(a) j(\003ag) f(and) g +(thr) n(ead) f(A) h(calls) h(select) e(with) g(a) i(timeout,) e(period) +n(ica) r(lly) h(waking) f(up) 221 5403 y(to) f(see) g(if) h(the) f +(\003ag) h(has) f(been) g(set.) p 90 rotate dyy eop +%%Page: 7 7 +7 6 bop Fe 63 249 a(REF) n(ERENCES) p Fg 2660 w(7) p +Fh 63 548 a(Refere) n(nces) p Fg 63 759 a([POSIX94]) p +Fa 46 w(Portable) 29 b(Operat) r(ing) f(System) g(Interface) h +(\(POSIX\)) e(Thr) n(ea) r(ds) h(Extension) p Fg(,) h(P1003) r(.1c) 245 +872 y(Draft) 23 b(10,) g(IEEE,) e(Septe) n(mber) i(1994) r(.) 63 +1059 y([Birr) n(ell89]) p Fa 47 w(An) 28 b(Intr) n(od) r(uction) g(to) h +(Pr) n(ogr) r(amming) g(with) g(Thr) n(ead) r(s) p Fg(,) h(Rese) n(ar) n +(ch) g(Repo) n(rt) e(35,) j(DEC) 245 1172 y(Syst) n(ems) 22 +b(Resear) n(ch) g(Center) -7 b(,) 22 b(Palo) h(Alto,) f(CA,) h(January) +g(1989) r(.) p 90 rotate dyy eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/docs/doxygen/other/shared_ptr_docstub.h b/docs/doxygen/other/shared_ptr_docstub.h new file mode 100755 index 000000000..428dd03f1 --- /dev/null +++ b/docs/doxygen/other/shared_ptr_docstub.h @@ -0,0 +1,24 @@ +namespace boost +{ + /*! + * \brief shared_ptr documentation stub + * + * \warning + * This isn't the real shared_ptr template. It's just enough to get doxygen + * to draw pretty collaboration diagrams. + * + * An enhanced relative of scoped_ptr with reference counted copy semantics. + * The object pointed to is deleted when the last shared_ptr pointing to it + * is destroyed or reset. + */ + +template<class T> class shared_ptr +{ +public: + + T * px; // contained pointer + +}; // shared_ptr + + +} // namespace boost diff --git a/docs/doxygen/other/tv-channel-frequencies b/docs/doxygen/other/tv-channel-frequencies new file mode 100644 index 000000000..e2780eca9 --- /dev/null +++ b/docs/doxygen/other/tv-channel-frequencies @@ -0,0 +1,79 @@ +# These are the center frequencies in MHz for North American broadcast +# TV channels. Each channel is 6 MHz wide, hence the bottom edge of the +# channel is 3 MHz below the value in this table. +# +# For NTSC (Analog) TV, the picture carrier is 1.25 MHz up from the +# bottom edge. NTSC has the FM audio at bottom + 5.75 and the spike is easily +# visible. +# +# For ATSC, the pilot tone is 0.31 MHz up from the bottom. +# +# + 2 57.00 + 3 63.00 + 4 69.00 + 5 79.00 + 6 85.00 + 7 177.00 + 8 183.00 + 9 189.00 + 10 195.00 + 11 201.00 + 12 207.00 + 13 213.00 + 14 473.00 + 15 479.00 + 16 485.00 + 17 491.00 + 18 497.00 + 19 503.00 + 20 509.00 + 21 515.00 + 22 521.00 + 23 527.00 + 24 533.00 + 25 539.00 + 26 545.00 + 27 551.00 + 28 557.00 + 29 563.00 + 30 569.00 + 31 575.00 + 32 581.00 + 33 587.00 + 34 593.00 + 35 599.00 + 36 605.00 + 37 611.00 + 38 617.00 + 39 623.00 + 40 629.00 + 41 635.00 + 42 641.00 + 43 647.00 + 44 653.00 + 45 659.00 + 46 665.00 + 47 671.00 + 48 677.00 + 49 683.00 + 50 689.00 + 51 695.00 + 52 701.00 + 53 707.00 + 54 713.00 + 55 719.00 + 56 725.00 + 57 731.00 + 58 737.00 + 59 743.00 + 60 749.00 + 61 755.00 + 62 761.00 + 63 767.00 + 64 773.00 + 65 779.00 + 66 785.00 + 67 791.00 + 68 797.00 + 69 803.00 diff --git a/docs/doxygen/other/vector_docstub.h b/docs/doxygen/other/vector_docstub.h new file mode 100644 index 000000000..139ce651d --- /dev/null +++ b/docs/doxygen/other/vector_docstub.h @@ -0,0 +1,16 @@ +namespace std +{ + /*! + * \brief vector documentation stub + * + * \warning + * This isn't the real vector template. It's just enough to get doxygen + * to draw pretty collaboration diagrams. + */ + template<class T> class vector + { + public: + T *p; + }; + +} // namespace std diff --git a/docs/doxygen/xml-swig/Makefile.am b/docs/doxygen/xml-swig/Makefile.am new file mode 100644 index 000000000..f508deb20 --- /dev/null +++ b/docs/doxygen/xml-swig/Makefile.am @@ -0,0 +1,25 @@ +# +# Copyright 2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +EXTRA_DIST = README doxy2swig.py swig.xsl + +CLEANFILES = *.xml combine.xslt compound.xsd index.xsd + diff --git a/docs/doxygen/xml-swig/README b/docs/doxygen/xml-swig/README new file mode 100644 index 000000000..e5187df28 --- /dev/null +++ b/docs/doxygen/xml-swig/README @@ -0,0 +1,129 @@ +# +# Copyright 2005 Free Software Foundation, Inc. +# +# This file is part of GNU Radio +# +# GNU Radio is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GNU Radio is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Radio; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, +# Boston, MA 02110-1301, USA. +# + +# +# Generating Python docstrings from C++ code using doxygen +# + +There are at least two strategies for this: + - use xsltproc as described below + - use doxy2swig.py (included in this directory) + +FIXME: get one of these working (probably doxy2swig since it doesn't +add any additional dependencies). + +---------------------------------------------------------------- + +Note: Robin's patch is in SWIG >= 1.3.23 + +-------------------------------------------------------------------------------- +From: http://mailman.cs.uchicago.edu/pipermail/swig/2004-October/010604.html + +> I applied the docstring patch. '%feature("autodoc",1");' is working as +> expected ... + +[problem solved. ...] + +> I can not agree more with the doxygen idea. I am using doxygen for +> documentation and I have been trying to put doxygen output to the +> python interface. Automatic generation of %feature("docstring") lines +> from doxygen output is the closest solution I can think of but the +> workload is still pretty big. How I wish this feature can be +> implemented in the near future. + +I have successfully extracted function/class description from doxygen +generated xml files, using an xslt script. To add doxygen generated +description to each class/function, you will need to (tested under +linux, note that this works only for Python, using Robin's docstring +patch) + +1. download swig source, apply Robin's docstring patch from + https://sourceforge.net/tracker/index.php?func=detail&aid=1023309&group_id=1645&atid=301645 + compile and install + +2. generate doxygen document with option "GENERATE_XML = YES" + +3. copy the attached script (save as swig.xsl) to the doc/xml directory + and run + + > xsltproc swig.xsl index.xml > temp_doc.i + > cat temp_doc.i | sed 's/"/\\"/g' | sed 's/__QuOtE__/"/g' > swig_doc.i + + you will get an interface file with lines like + %feature("docstring") class "class description"; + %feature("docstring") class::function "member function + description"; + + the second step is necessary since there might be " in descriptions + and I need to backquote them before I replace __QuOtE__ by real + quotes. (xslt experts may know how to post-process <xsl:value-of> and + make the script easier to use.) + +4. in your interface file, add + %include "siwg_doc.i" + %feature("autodoc","1") ; + +Hope this helps. + +swig.xsl: +========================================================= + +<!-- XSLT script to extract document for class/function for swig docstring + If you have xsltproc you could use: + xsltproc swig.xsl index.xml > swig_doc.i +--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="text"/> + <xsl:template match="/"> + <!-- process each compound --> + <xsl:for-each select="doxygenindex/compound"> + <xsl:apply-templates select="document( concat( @refid, '.xml' ) )/*" /> + </xsl:for-each> + </xsl:template> + + <xsl:template match="doxygen"> + <xsl:for-each select="compounddef[@kind='class']"> + <xsl:text>%feature(__QuOtE__docstring__QuOtE__) </xsl:text> + <xsl:value-of select="compoundname"/> + <xsl:text> __QuOtE__ </xsl:text> + <xsl:value-of select="briefdescription"/><xsl:text> + </xsl:text> + <xsl:value-of select="detaileddescription"/> + <xsl:text> see also: </xsl:text> + <xsl:value-of select="includes"/> + <xsl:text>__QuOtE__; </xsl:text> + + <!-- output for each function individually --> + <xsl:for-each select="*/memberdef[@kind='function' and not(starts-with(name,'operator'))]"> + <xsl:text>%feature(__QuOtE__docstring__QuOtE__) </xsl:text><xsl:value-of select="../../compoundname"/>::<xsl:value-of select="name"/> + <xsl:text> __QuOtE__ </xsl:text> + <xsl:value-of select="definition"/> <xsl:value-of select="argsstring"/> + <xsl:text> + </xsl:text><xsl:value-of select="briefdescription"/><xsl:text> + </xsl:text><xsl:value-of select="detaileddescription"/> + <xsl:text>__QuOtE__; </xsl:text> + </xsl:for-each> + </xsl:for-each> + </xsl:template> +</xsl:stylesheet> + +-- +Bo Peng
\ No newline at end of file diff --git a/docs/doxygen/xml-swig/doxy2swig.py b/docs/doxygen/xml-swig/doxy2swig.py new file mode 100644 index 000000000..1e379d943 --- /dev/null +++ b/docs/doxygen/xml-swig/doxy2swig.py @@ -0,0 +1,371 @@ +#!/usr/bin/env python +"""Doxygen XML to SWIG docstring converter. + +Converts Doxygen generated XML files into a file containing docstrings +that can be used by SWIG-1.3.x. Note that you need to get SWIG +version > 1.3.23 or use Robin Dunn's docstring patch to be able to use +the resulting output. + +Usage: + + doxy2swig.py input.xml output.i + +input.xml is your doxygen generated XML file and output.i is where the +output will be written (the file will be clobbered). + +""" + +# This code is implemented using Mark Pilgrim's code as a guideline: +# http://www.faqs.org/docs/diveintopython/kgp_divein.html +# +# Author: Prabhu Ramachandran +# License: BSD style + + +from xml.dom import minidom +import re +import textwrap +import sys +import types +import os.path + + +def my_open_read(source): + if hasattr(source, "read"): + return source + else: + return open(source) + +def my_open_write(dest): + if hasattr(dest, "write"): + return dest + else: + return open(dest, 'w') + + +class Doxy2SWIG: + """Converts Doxygen generated XML files into a file containing + docstrings that can be used by SWIG-1.3.x that have support for + feature("docstring"). Once the data is parsed it is stored in + self.pieces. + + """ + + def __init__(self, src): + """Initialize the instance given a source object (file or + filename). + + """ + f = my_open_read(src) + self.my_dir = os.path.dirname(f.name) + self.xmldoc = minidom.parse(f).documentElement + f.close() + + self.pieces = [] + self.pieces.append('\n// File: %s\n'%\ + os.path.basename(f.name)) + + self.space_re = re.compile(r'\s+') + self.lead_spc = re.compile(r'^(%feature\S+\s+\S+\s*?)"\s+(\S)') + self.multi = 0 + self.ignores = ('inheritancegraph', 'param', 'listofallmembers', + 'innerclass', 'name', 'declname', 'incdepgraph', + 'invincdepgraph', 'programlisting', 'type', + 'references', 'referencedby', 'location', + 'collaborationgraph', 'reimplements', + 'reimplementedby', 'derivedcompoundref', + 'basecompoundref') + #self.generics = [] + + def generate(self): + """Parses the file set in the initialization. The resulting + data is stored in `self.pieces`. + + """ + self.parse(self.xmldoc) + + def parse(self, node): + """Parse a given node. This function in turn calls the + `parse_<nodeType>` functions which handle the respective + nodes. + + """ + pm = getattr(self, "parse_%s"%node.__class__.__name__) + pm(node) + + def parse_Document(self, node): + self.parse(node.documentElement) + + def parse_Text(self, node): + txt = node.data + txt = txt.replace('\\', r'\\\\') + txt = txt.replace('"', r'\"') + # ignore pure whitespace + m = self.space_re.match(txt) + if m and len(m.group()) == len(txt): + pass + else: + self.add_text(textwrap.fill(txt)) + + def parse_Element(self, node): + """Parse an `ELEMENT_NODE`. This calls specific + `do_<tagName>` handers for different elements. If no handler + is available the `generic_parse` method is called. All + tagNames specified in `self.ignores` are simply ignored. + + """ + name = node.tagName + ignores = self.ignores + if name in ignores: + return + attr = "do_%s" % name + if hasattr(self, attr): + handlerMethod = getattr(self, attr) + handlerMethod(node) + else: + self.generic_parse(node) + #if name not in self.generics: self.generics.append(name) + + def add_text(self, value): + """Adds text corresponding to `value` into `self.pieces`.""" + if type(value) in (types.ListType, types.TupleType): + self.pieces.extend(value) + else: + self.pieces.append(value) + + def get_specific_nodes(self, node, names): + """Given a node and a sequence of strings in `names`, return a + dictionary containing the names as keys and child + `ELEMENT_NODEs`, that have a `tagName` equal to the name. + + """ + nodes = [(x.tagName, x) for x in node.childNodes \ + if x.nodeType == x.ELEMENT_NODE and \ + x.tagName in names] + return dict(nodes) + + def generic_parse(self, node, pad=0): + """A Generic parser for arbitrary tags in a node. + + Parameters: + + - node: A node in the DOM. + - pad: `int` (default: 0) + + If 0 the node data is not padded with newlines. If 1 it + appends a newline after parsing the childNodes. If 2 it + pads before and after the nodes are processed. Defaults to + 0. + + """ + npiece = 0 + if pad: + npiece = len(self.pieces) + if pad == 2: + self.add_text('\n') + for n in node.childNodes: + self.parse(n) + if pad: + if len(self.pieces) > npiece: + self.add_text('\n') + + def space_parse(self, node): + self.add_text(' ') + self.generic_parse(node) + + do_ref = space_parse + do_emphasis = space_parse + do_bold = space_parse + do_computeroutput = space_parse + do_formula = space_parse + + def do_compoundname(self, node): + self.add_text('\n\n') + data = node.firstChild.data + self.add_text('%%feature("docstring") %s "\n'%data) + + def do_compounddef(self, node): + kind = node.attributes['kind'].value + if kind in ('class', 'struct'): + prot = node.attributes['prot'].value + if prot <> 'public': + return + names = ('compoundname', 'briefdescription', + 'detaileddescription', 'includes') + first = self.get_specific_nodes(node, names) + for n in names: + if first.has_key(n): + self.parse(first[n]) + self.add_text(['";','\n']) + for n in node.childNodes: + if n not in first.values(): + self.parse(n) + elif kind in ('file', 'namespace'): + nodes = node.getElementsByTagName('sectiondef') + for n in nodes: + self.parse(n) + + def do_includes(self, node): + self.add_text('C++ includes: ') + self.generic_parse(node, pad=1) + + def do_parameterlist(self, node): + self.add_text(['\n', '\n', 'Parameters:', '\n']) + self.generic_parse(node, pad=1) + + def do_para(self, node): + self.add_text('\n') + self.generic_parse(node, pad=1) + + def do_parametername(self, node): + self.add_text('\n') + self.add_text("%s: "%node.firstChild.data) + + def do_parameterdefinition(self, node): + self.generic_parse(node, pad=1) + + def do_detaileddescription(self, node): + self.generic_parse(node, pad=1) + + def do_briefdescription(self, node): + self.generic_parse(node, pad=1) + + def do_memberdef(self, node): + prot = node.attributes['prot'].value + id = node.attributes['id'].value + kind = node.attributes['kind'].value + tmp = node.parentNode.parentNode.parentNode + compdef = tmp.getElementsByTagName('compounddef')[0] + cdef_kind = compdef.attributes['kind'].value + + if prot == 'public': + first = self.get_specific_nodes(node, ('definition', 'name')) + name = first['name'].firstChild.data + if name[:8] == 'operator': # Don't handle operators yet. + return + + defn = first['definition'].firstChild.data + self.add_text('\n') + self.add_text('%feature("docstring") ') + + anc = node.parentNode.parentNode + if cdef_kind in ('file', 'namespace'): + ns_node = anc.getElementsByTagName('innernamespace') + if not ns_node and cdef_kind == 'namespace': + ns_node = anc.getElementsByTagName('compoundname') + if ns_node: + ns = ns_node[0].firstChild.data + self.add_text(' %s::%s "\n%s'%(ns, name, defn)) + else: + self.add_text(' %s "\n%s'%(name, defn)) + elif cdef_kind in ('class', 'struct'): + # Get the full function name. + anc_node = anc.getElementsByTagName('compoundname') + cname = anc_node[0].firstChild.data + self.add_text(' %s::%s "\n%s'%(cname, name, defn)) + + for n in node.childNodes: + if n not in first.values(): + self.parse(n) + self.add_text(['";', '\n']) + + def do_definition(self, node): + data = node.firstChild.data + self.add_text('%s "\n%s'%(data, data)) + + def do_sectiondef(self, node): + kind = node.attributes['kind'].value + if kind in ('public-func', 'func'): + self.generic_parse(node) + + def do_simplesect(self, node): + kind = node.attributes['kind'].value + if kind in ('date', 'rcs', 'version'): + pass + elif kind == 'warning': + self.add_text(['\n', 'WARNING: ']) + self.generic_parse(node) + elif kind == 'see': + self.add_text('\n') + self.add_text('See: ') + self.generic_parse(node) + else: + self.generic_parse(node) + + def do_argsstring(self, node): + self.generic_parse(node, pad=1) + + def do_member(self, node): + kind = node.attributes['kind'].value + refid = node.attributes['refid'].value + if kind == 'function' and refid[:9] == 'namespace': + self.generic_parse(node) + + def do_doxygenindex(self, node): + self.multi = 1 + comps = node.getElementsByTagName('compound') + for c in comps: + refid = c.attributes['refid'].value + fname = refid + '.xml' + if not os.path.exists(fname): + fname = os.path.join(self.my_dir, fname) + print "parsing file: %s"%fname + p = Doxy2SWIG(fname) + p.generate() + self.pieces.extend(self.clean_pieces(p.pieces)) + + def write(self, fname): + o = my_open_write(fname) + if self.multi: + o.write("".join(self.pieces)) + else: + o.write("".join(self.clean_pieces(self.pieces))) + o.close() + + def clean_pieces(self, pieces): + """Cleans the list of strings given as `pieces`. It replaces + multiple newlines by a maximum of 2 and returns a new list. + It also wraps the paragraphs nicely. + + """ + ret = [] + count = 0 + for i in pieces: + if i == '\n': + count = count + 1 + else: + if i == '";': + if count: + ret.append('\n') + elif count > 2: + ret.append('\n\n') + elif count: + ret.append('\n'*count) + count = 0 + ret.append(i) + + _data = "".join(ret) + ret = [] + for i in _data.split('\n\n'): + if i == 'Parameters:': + ret.extend(['Parameters:\n-----------', '\n\n']) + elif i.find('// File:') > -1: # leave comments alone. + ret.extend([i, '\n']) + else: + _tmp = textwrap.fill(i.strip()) + _tmp = self.lead_spc.sub(r'\1"\2', _tmp) + ret.extend([_tmp, '\n\n']) + return ret + + +def main(input, output): + p = Doxy2SWIG(input) + p.generate() + p.write(output) + + +if __name__ == '__main__': + if len(sys.argv) != 3: + print __doc__ + sys.exit(1) + main(sys.argv[1], sys.argv[2]) diff --git a/docs/doxygen/xml-swig/swig.xsl b/docs/doxygen/xml-swig/swig.xsl new file mode 100644 index 000000000..6163c2d9f --- /dev/null +++ b/docs/doxygen/xml-swig/swig.xsl @@ -0,0 +1,38 @@ +<!-- XSLT script to extract document for class/function for swig docstring + If you have xsltproc you could use: + xsltproc swig.xsl index.xml > swig_doc.i +--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="text"/> + <xsl:template match="/"> + <!-- process each compound --> + <xsl:for-each select="doxygenindex/compound"> + <xsl:apply-templates select="document( concat( @refid, '.xml' ) )/*" /> + </xsl:for-each> + </xsl:template> + + <xsl:template match="doxygen"> + <xsl:for-each select="compounddef[@kind='class']"> + <xsl:text>%feature(__QuOtE__docstring__QuOtE__) </xsl:text> + <xsl:value-of select="compoundname"/> + <xsl:text> __QuOtE__ </xsl:text> + <xsl:value-of select="briefdescription"/><xsl:text> + </xsl:text> + <xsl:value-of select="detaileddescription"/> + <xsl:text> see also: </xsl:text> + <xsl:value-of select="includes"/> + <xsl:text>__QuOtE__; </xsl:text> + + <!-- output for each function individually --> + <xsl:for-each select="*/memberdef[@kind='function' and not(starts-with(name,'operator'))]"> + <xsl:text>%feature(__QuOtE__docstring__QuOtE__) </xsl:text><xsl:value-of select="../../compoundname"/>::<xsl:value-of select="name"/> + <xsl:text> __QuOtE__ </xsl:text> + <xsl:value-of select="definition"/> <xsl:value-of select="argsstring"/> + <xsl:text> + </xsl:text><xsl:value-of select="briefdescription"/><xsl:text> + </xsl:text><xsl:value-of select="detaileddescription"/> + <xsl:text>__QuOtE__; </xsl:text> + </xsl:for-each> + </xsl:for-each> + </xsl:template> +</xsl:stylesheet> |