new user distribution of PEARL procedures

This commit is contained in:
2016-02-10 16:00:34 +01:00
commit 1e9fbf0beb
37 changed files with 18585 additions and 0 deletions

2381
doc/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

194
doc/DoxygenLayout.xml Normal file
View File

@ -0,0 +1,194 @@
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.9.1 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="Packages" intro="Packages are collections of procedure files to be loaded together. PEARL defines the following packages:"/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="no" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>

242
doc/doxygen-filter-ipf.awk Normal file
View File

@ -0,0 +1,242 @@
# Proof of concept implementation for using doxygen to document Igor Pro procedures
# This awk script serves as input filter for Igor procedures and produces a C-ish version of the declarations
# Tested with Igor Pro 6.34A and doxygen 1.8.7
#
# Thomas Braun: 9/2014
# Version: 0.23
# Supported Features:
# -Functions
# -Macros
# -File constants
# -Menu items are currently ignored
# TODO
# - don't delete the function/macro subType
BEGIN{
# allows to bail out for code found outside of functions/macros
DO_WARN=0
IGNORECASE=1
output=""
warning=""
menuEndCount=0
}
# Remove whitespace at beginning and end of string
# Return the whitespace in front of the string in the
# global variable frontSpace to be able
# to reconstruct the indentation
function trim(str)
{
if(match(str, /^[[:space:]]+/))
{
frontSpace = substr(str, 1, RLENGTH)
str = substr(str, RLENGTH + 1)
}
else
frontSpace = ""
gsub(/[[:space:]]+$/,"",str)
return str
}
# Split an already trimmed line into words
# Returns the number of words
function splitIntoWords(str, a, numEntries)
{
return split(str,a,/[[:space:],&*]+/)
}
# Split params into words and prefix each with "__Param__$i"
# where $i is increased for every parameter
# Returns the concatenation of all prefixed parameters
function handleParameter(params, a, i, iOpt, str, entry)
{
numParams = splitIntoWords(params, a)
str=""
entry=""
iOpt=numParams
for(i=1; i <= numParams; i++)
{
# convert igor optional parameters to something doxygen understands
# igor dictates that the optional arguments are the last arguments,
# meaning no normal argument can follow the optional arguments
if(gsub(/[\[\]]/,"",a[i]) || i > iOpt)
{
iOpt = i
entry = a[i] " = defaultValue"
}
else
entry = a[i]
str = str "__Param__" i " " entry
if(i < numParams)
str = str ", "
}
return str
}
{
# split current line into code and comment
if(match($0,/\/\/.*/))
{
code=substr($0,0,RSTART-1)
comment=substr($0,RSTART,RLENGTH)
}
else
{
code=$0
comment=""
}
# remove whitespace from front and back
code=trim(code)
# begin of macro definition
if(!insideFunction && !insideMacro && ( match(code,/^Window/)|| match(code,/^Proc/) || match(code,/^Macro/) ) )
{
insideMacro=1
gsub(/^Window/,"void",code)
gsub(/^Macro/,"void",code)
gsub(/^Proc/,"void",code)
# add opening bracket, this also throws away any function subType
gsub(/\).*/,"){",code)
}
# end of macro definition
else if(!insideFunction && insideMacro && ( match(code,/^EndMacro$/) || match(code,/^End$/) ) )
{
insideMacro=0
code = "}"
}
# begin of function declaration
else if(!insideFunction && ( match(code,/[[:space:]]function[\/[[:space:]]/) || match(code,/^function[\/[[:space:]]/) ) )
{
insideFunction=1
# remove whitespace between function and return type flag
gsub(/function[[:space:]]*\//,"function/",code)
# different return types
gsub(/function /,"variable ",code)
gsub(/function\/df/,"dfr",code)
gsub(/function\/wave/,"wave",code)
gsub(/function\/c/,"complex",code)
gsub(/function\/s/,"string",code)
gsub(/function\/t/,"string",code) # deprecated definition of string return type
gsub(/function\/d/,"variable",code)
# add opening bracket, this also throws away any function subType
gsub(/\).*/,"){",code)
# do we have function parameters
if(match(code,/\(.*[a-z]+.*\)/))
{
paramStr = substr(code,RSTART+1,RLENGTH-2)
paramStrWithTypes = handleParameter(paramStr, params)
paramsToHandle = numParams
# print "paramStr __ " paramStr
# print "paramStrWithTypes __ " paramStrWithTypes
# print "paramsToHandle __ " paramsToHandle
code = substr(code,0,RSTART) "" paramStrWithTypes "" substr(code,RSTART+RLENGTH-1)
}
}
else if(insideFunction && paramsToHandle > 0)
{
numEntries = splitIntoWords(code,entries)
# printf("Found %d words in line \"%s\"\n",numEntries,code)
for(i=2; i <= numEntries; i++)
for(j=1; j <= numParams; j++)
{
variableName = entries[i]
if( entries[i] == params[j] )
{
paramsToHandle--
# now replace __Param__$i with the real parameter type
if(entries[1] == "struct")
paramType = entries[2]
else
paramType = tolower(entries[1])
# add asterisk for call-by-reference parameters
if(match(code,/\&/))
paramType = paramType "*"
output = gensub("__Param__" j " ",paramType " ","g",output)
# printf("Found parameter type %s at index %d\n",paramType,j)
}
}
}
# end of function declaration
else if(insideFunction && match(code,/^end$/))
{
insideFunction=0
code = "}"
}
# structure declaration
if(!insideFunction && !insideMacro && ( match(code,/[[:space:]]structure[[:space:]]/) || match(code,/^structure[[:space:]]/) ) )
{
insideStructure=1
gsub(/structure/,"struct",code)
code = code "{"
}
if(insideStructure && match(code,/EndStructure/))
{
insideStructure=0
code = "}"
}
# menu definition
# submenues can be nested in menus. Therefore we have to keep track
# of the number of expected "End" keywords
if(!insideFunction && !insideMacro && ( match(code,/\yMenu\y/) || match(code,/\ySubMenu\y/) ))
{
menuEndCount++
insideMenu=1
}
if(insideMenu && match(code,/\yEnd[[:space:]]*/))
{
menuEndCount--
if(menuEndCount == 0)
{
insideMenu=0
code = ""
}
}
# global constants
gsub(/\ystrconstant\y/,"const string",code)
gsub(/\yconstant\y/,"const variable",code)
# prevent that doxygen sees elseif as a function call
gsub(/\yelseif\y/,"else if",code)
# code outside of function/macro definitions is "translated" into statements
if(!insideFunction && !insideMacro && !insideMenu && code != "" && substr(code,0,1) != "#")
{
if(code != "}" && !insideStructure && DO_WARN)
warning = warning "\n" "warning " NR ": outside code \"" code "\""
code = code ";"
}
if(!insideMenu)
{
output = output frontSpace code comment
}
output = output "\n"
}
END{
print output
if(DO_WARN)
print warning
}

27
doc/makefile Normal file
View File

@ -0,0 +1,27 @@
SHELL=/bin/sh
# makefile for PEARL procedures documentation
#
.SUFFIXES:
.SUFFIXES: .c .cpp .cxx .exe .f .h .i .o .py .pyf .so .html
.PHONY: all docs clean
DOX=doxygen
DOXOPTS=
LATEX_DIR=latex
all: docs
docs: doxygen pdf
doxygen:
$(DOX) $(DOXOPTS) Doxyfile
pdf: doxygen
-$(MAKE) -C $(LATEX_DIR)
clean:
-rm latex/*
-rm html/*

17
doc/readme.txt Normal file
View File

@ -0,0 +1,17 @@
this folder and subfolders contain the documentation of the PEARL procedures in HTML and PDF format.
the documentation is currently migrated to the doxygen format.
descriptions may be incomplete until the migration is finished.
to compile the documentation the following pieces of software are required:
doxygen:
http://www.doxygen.org/
gawk:
http://gnuwin32.sourceforge.net/packages/gawk.htm (windows)
doxygen-filter-ipf.awk:
http://www.igorexchange.com/project/doxIPFFilter
please see the original web sites for terms of use.