diff --git a/doc/cdg_cfg.json b/doc/cdg_cfg.json new file mode 100755 index 0000000..67856c1 --- /dev/null +++ b/doc/cdg_cfg.json @@ -0,0 +1,107 @@ +{ + cfg : + { + // All paths and file names that do not begin with a '/' + // are prepended with the directory of this configuration + // file. + // + // If the last char in an 'in_dir' or 'excl_dir' path is NOT a '/' + // then the path represents all paths rooted on the given path. + // If the last char is a '/' then only the explicit path is + // used. + + // Note:if the last char in an input director path is a '/' then do not recurse + in_dir: [ "../src/" "../src/app" "../src/dsp" ] + excl_dir: [ ] + + edoc_fn: [ "libcm.pd" ] + html_prefix: "cdg_code_prefix.html" + html_suffix: "cdg_code_suffix.html" + anchor_fn: "cdg_ext_anch.json" + out_dir: "html" + + vc_prefix: [ + ["/home/kevin/src/libcm/doc/../src","https://gitea.currawongproject.org/cml/libcm/src/branch/master/src"] + ] + + + pandoc_exec: "/home/kevin/.local/bin/pandoc" + + // Only files with these extenstions will be processed. + file_ext: [ "h","c" ] + + // Exclude the following labels as anchor candidates. + anchor_excl: [ "foo", "label", "anchor" ] + + // Set 'true' to report comments that are not attached to + // structural elements. + rptFloatCmmtFl: false + + // Report if a 'ctag' generated tag could not be found. + rptMissingTagsFl: false + + // Report processed files + rptProcFilesFl: false + + // Report missing H files + rptMissingHFilesFl: true + + // Report missing C files + rptMissingCFilesFl: false + + // Report duplicate anchors. + rptDuplAnchorsFl: false + + // Maximum character count of output HTML lines + htmlMaxLineLength: 200 + + // Wrap Long Functions + wrapFunctionsFl: false + + // Preserve space + preserveSpaceFl: true + + // Link to field names + linkToFieldNamesFl: false + + // Use the external anchor files from ./cdg + usePrefExtAnchorFl: false + + // Run the edoc files through pandoc + runFinalPandocFl: true + + // Treat all selected files which do not have block + // markers as though they are wrapped in block markers. + promiscuousModeFl: false + + keyword_index: + [ + [ base "Foundation classes and API's"] + [ real_time "Real-time system classes and API's"] + ] + + pandoc_args: + [ + "-fmarkdown" + "-thtml5" + "--css" + "cdg_div_cod.css" + "--css" + "cdg_edoc.css" + "--css" + "style.css" + "--toc" + "--standalone" + "--number-sections" + ] + + copy_files: + [ + "cdg_div_cod.css" + "cdg_edoc.css" + "cdg_code.css" + "style.css" + ] + + } +} diff --git a/doc/cdg_code.css b/doc/cdg_code.css new file mode 100644 index 0000000..a10e708 --- /dev/null +++ b/doc/cdg_code.css @@ -0,0 +1,30 @@ + +td.linenos { background-color: #fffff0; padding-right: 10px; } +span.lineno { background-color: #fffff0; padding: 0 5px 0 5px; } +pre { line-height: 135%; } +body .hll { background-color: #ffffff; } +body { background: #f8f8f8; } +body .c { color: firebrick; font-style: italic; } /* Comment */ +body .k { color: #008000; font-weight: normal; } /* Keyword.Reserved */ +body .p { color: #666666; } /* Operator */ +body .f { color: #0000ff; font-weight: normal; } /* Function */ +body .e { color: #0000ff; font-weight: normal; } /* enum */ +body .m { color: #008000; font-weight: normal; } /* macro */ +body .t { color: #008000; font-weight: normal; } /* typedef */ +body .i { color: #0000ff; font-weight: normal; } /* ident */ +body .l { color: #660066; } /* Literal */ +body .u { color: #000000; } +body .a { + border: 1px dotted gray; + background-color: #ececec; + color: #1111111; + padding: 0.5em; +} + +#hr1 { height: 1; color:#000000; background-color: #ff0000; } +#hr2 { height: 4; color:#000000; background-color: #ff0000; } + +.blk_title { + font-wieght: bold; + font-size: 120%; +} diff --git a/doc/cdg_code_prefix.html b/doc/cdg_code_prefix.html new file mode 100755 index 0000000..c2c3661 --- /dev/null +++ b/doc/cdg_code_prefix.html @@ -0,0 +1,13 @@ + + + + + + + + + + + + +
diff --git a/doc/cdg_code_suffix.html b/doc/cdg_code_suffix.html new file mode 100755 index 0000000..9943ff0 --- /dev/null +++ b/doc/cdg_code_suffix.html @@ -0,0 +1,3 @@ +
+ + diff --git a/doc/cdg_div_cod.css b/doc/cdg_div_cod.css new file mode 100644 index 0000000..bff2ba6 --- /dev/null +++ b/doc/cdg_div_cod.css @@ -0,0 +1,24 @@ + + +.cod pre .c { color: firebrick; font-weight: normal; } /* Comment */ +.cod pre .k { color: #008000; font-weight: normal; } /* Keyword.Reserved */ +.cod pre .p { color: #666666 } /* Operator */ +.cod pre .f { color: #000000; font-weight: normal; } /* Function */ +.cod pre .e { color: #000000; font-weight: normal; } /* enum */ +.cod pre .m { color: #008000; font-weight: normal; } /* macro */ +.cod pre .t { color: #008000; font-weight: normal; } /* typedef */ +.cod pre .i { color: #000000; font-weight: normal; } /* ident */ +.cod pre .l { color: #660066 } /* Literal */ +.cod pre .u { color: #000000 } + +.cod pre a:link {text-decoration:none; font-weight:500; } +.cod pre a:visited {text-decoration:none; font-weight:500; } +.cod pre a:hover {text-decoration:none; font-weight:700; } + +/* embedded pandoc comments */ +.cod pre .a { + border: 1px dotted gray; + background-color: #ececec; + color: #1111111; + padding: 0.5em; +} diff --git a/doc/cdg_edoc.css b/doc/cdg_edoc.css new file mode 100755 index 0000000..f192cd9 --- /dev/null +++ b/doc/cdg_edoc.css @@ -0,0 +1,106 @@ +body { + margin: auto; + padding-right: 1em; + padding-left: 1em; + max-width: 44em; + border-left: 1px solid black; + border-right: 1px solid black; + color: black; + font-family: Verdana, sans-serif; + font-size: 100%; + line-height: 140%; + color: #333; +} +pre { + border: 1px dotted gray; + background-color: #ececec; + color: #1111111; + padding: 0.5em; +} +code { + font-family: monospace; + line-height: 115% +} +h1 a, h2 a, h3 a, h4 a, h5 a { + text-decoration: none; + color: #424242; +} +h1, h2, h3, h4, h5 { font-family: verdana; + font-weight: bold; + color: #424242; } +h1 { + font-size: 150%; + border-bottom: 3px solid black; +} + +h2 { + font-size: 110%; + border-bottom: 1px solid black; +} + +h3 { + font-size: 90%; + border-bottom: 1px dotted black; + +} + +h4 { + font-size: 80%; + font-style: italic; +} + +h5 { + font-size: 80%; + font-style: italic; +} + +table { + width: 100%; + background-color: #acacac; + text-align:left; +} + +table .odd { + background-color: #fcfcfc; +} + +table .even { + background-color: #ececec; +} + + +h1.title { + font-size: 200%; + font-weight: bold; + padding-top: 0.2em; + padding-bottom: 0.2em; + text-align: left; + border: none; +} + +dt code { + font-weight: bold; +} +dd p { + margin-top: 0; +} + +#footer { + padding-top: 1em; + font-size: 70%; + color: gray; + text-align: center; + } + +/* specify the height of example blocks (
's inside of 
) */ +.cod pre +{ + line-height: 115%; +} + +/* control the kw index label column width */ +.kw_label_col { + width:200px; + max-width:200px; + min-width:200px; +} diff --git a/doc/cdg_ext_anch.json b/doc/cdg_ext_anch.json new file mode 100755 index 0000000..1230ad4 --- /dev/null +++ b/doc/cdg_ext_anch.json @@ -0,0 +1,6 @@ +{ + anchors: + [ + { label: "Pandoc" anchor:"http://johnmacfarlane.net/pandoc/README.html" } + ] +} diff --git a/doc/gen_doc.sh b/doc/gen_doc.sh new file mode 100755 index 0000000..c126948 --- /dev/null +++ b/doc/gen_doc.sh @@ -0,0 +1,28 @@ + +# switches: -E : Stop after preprocess +# -C : Do not strip comments. +# -P : Do not generate line markers +# -traditional-cpp : preserve white space + +# run the pre-processor to generate the vector ops documentation +gcc -E -C -P -traditional-cpp -o temp.h ../src/vop/cmVectOpsDoc.h + +# The --traditional-cpp switch prevents the 'stringizing' +# C pre-proc direcive from working this leaves '##_' tokens +# which need to be replaced by '_' +# replace '_##` with '_' +sed 's/\(_##\)/_/g' temp.h > temp1.h + +# Remove header text generated by gcc. +# sed '/\/\*/,/\/\/end_cut/{#!d}' temp.h +sed '/\/\*/,/\/\/end_cut/{//!d;};' temp1.h > temp2.h + +# Remove the first two lines. +tail -n +3 temp2.h > ../src/cmVectOpsDocOut.h + +rm -f temp.h +rm -f temp1.h +rm -f temp2.h + +# Run the doc generator +#cdg -c cdg_cfg.json -o ~/temp/doc_libcm diff --git a/doc/libcm.pd b/doc/libcm.pd new file mode 100755 index 0000000..2f04600 --- /dev/null +++ b/doc/libcm.pd @@ -0,0 +1,102 @@ +% _libcm_ Reference Documentation +% + +Prerequisites: +============== + +Fedora: +`sudo dnf install fftw fftw-devel atlas atlas-devel alsa-lib alsa-lib-devel` + + + +_cm_ Classes And API's +====================== + +### Foundation classes used throughout the _cm_ library. + +{$cdg_kw_list_cdg base} + +### Audio related classes. + +{$cdg_kw_list_cdg audio} + +### MIDI related classes. + +{$cdg_kw_list_cdg midi} + +### File readers and writers. +{$cdg_kw_list_cdg file} + +### Text processing related classes. +{$cdg_kw_list_cdg text} + +### Container related classes. +{$cdg_kw_list_cdg container} + +### Math related classes. +{$cdg_kw_list_cdg math} + +### Vector operations +{$cdg_kw_list_cdg vop} + +### Multi-threading and parallel processing. +{$cdg_kw_list_cdg parallel} + +### Data network related classes. +{$cdg_kw_list_cdg network} + +### Operating system interface classes. +{$cdg_kw_list_cdg system} + +### Clock and time related classes. +{$cdg_kw_list_cdg time} + +### Real-time processing related classes +{$cdg_kw_list_cdg rt} + +### Signal analysis related classes +{$cdg_kw_list_cdg analysis} + +### Plotting related classes. +{$cdg_kw_list_cdg plot} + +### Demo functions. +{$cdg_kw_list_cdg demo} + +### 'proc' library modules. +{$cdg_kw_list_cdg proclib} + +### 'proc' classes. +{$cdg_kw_list_cdg proc} + +### Modeling related classes. +{$cdg_kw_list_cdg model} + +### Improved real-time system. +{$cdg_kw_list_cdg rtsys} + +### _fluxo_ related classes. +{$cdg_kw_list_cdg fluxo} + +### _GUTIM_ related classes. +{$cdg_kw_list_cdg gutim} + +### Musical score related classes +{$cdg_kw_list_cdg score} + +### Sequencer related classes +{$cdg_kw_list_cdg seq} + +### Dataflow system classes. +{$cdg_kw_list_cdg snap} + +### Dataflow processesing units. +{$cdg_kw_list_cdg sunit} + +### Dataflow built-in programs +{$cdg_kw_list_cdg spgm} + +File List +========= + +{$cdg_file_list_cdg} diff --git a/doc/style.css b/doc/style.css new file mode 100755 index 0000000..280bd4b --- /dev/null +++ b/doc/style.css @@ -0,0 +1,166 @@ +body { + margin: auto; + padding-right: 1em; + padding-left: 1em; + max-width: 55em; + border-left: 1px solid black; + border-right: 1px solid black; + color: black; + background: #F8F5EC; + font-family: Arial, Helvetica, sans-serif; + font-size: 90%; + font-weight: normal + line-height: 100%; + + color: #333333; +} +pre { + border: 1px dotted gray; + background-color: #ececec; + color: #1111111; + padding: 0.5em; +} +code { + font-family: monospace; + line-height: 100%; +} +h1 a, h2 a, h3 a, h4 a, h5 a { + text-decoration: none; + color: #660000; +} +h1, h2, h3, h4, h5 { font-family: verdana; + font-weight: bold; + color: #660000; } +h1 { + font-size: 100%; + border-bottom: 1px solid black; +} + +h2 { + font-size: 100%; + color:$660000; + +} + +h3 { + font-size: 95%; +} + +h4 { + font-size: 90%; + font-style: italic; +} + +h5 { + font-size: 90%; + font-style: italic; +} + +h1.title { + font-size: 200%; + font-weight: bold; + padding-top: 0.2em; + padding-bottom: 0.2em; + text-align: left; + border: none; +} + +dt code { + font-weight: bold; +} +dd p { + margin-top: 0; +} + +#footer { + padding-top: 1em; + font-size: 70%; + color: gray; + text-align: center; +} + +table { + width: 100%; + background-color: #acacac; + text-align:left; +} + +table .odd { + background-color: #f7f7f7; +} + +table .even { + background-color: #ececec; +} + +a:link { color:inherit; font-weight:bold; text-decoration: none; } +a:active { color:inherit; font-weight:bold; text-decoration: none; } +a:visited { color:inherit; font-weight:bold; text-decoration: none; } +a:hover { color:inherit; font-weight:bold; text-decoration: none; } + +td.linenos { background-color: #f0f0f0; padding-right: 10px; } +span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; } +pre { line-height: 125%; } +span.hll { background-color: #ffffcc } + +span.c { color: #008800; font-style: italic } /* Comment */ +span.err { border: 1px solid #FF0000 } /* Error */ +span.k { color: #AA22FF; font-weight: normal } /* Keyword */ +span.o { color: #666666 } /* Operator */ +span.cm { color: #FF0000; font-style: italic } /* Comment.Multiline */ +span.cp { color: #8000FF } /* Comment.Preproc */ +span.c1 { color: #FF0000; font-style: italic } /* Comment.Single */ +span.cs { color: #FF0000; font-weight: bold } /* Comment.Special */ +span.gd { color: #A00000 } /* Generic.Deleted */ +span.ge { font-style: italic } /* Generic.Emph */ +span.gr { color: #FF0000 } /* Generic.Error */ +span.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +span.gi { color: #00A000 } /* Generic.Inserted */ +span.go { color: #808080 } /* Generic.Output */ +span.gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +span.gs { font-weight: bold } /* Generic.Strong */ +span.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +span.gt { color: #0040D0 } /* Generic.Traceback */ +span.kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */ +span.kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */ +span.kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */ +span.kp { color: #AA22FF } /* Keyword.Pseudo */ +span.kr { color: #008800; font-weight: normal } /* Keyword.Reserved */ +span.kt { color: #008800; font-weight: normal } /* Keyword.Type */ +span.m { color: #666666 } /* Literal.Number */ +span.s { color: #BB4444 } /* Literal.String */ +span.na { color: #BB4444 } /* Name.Attribute */ +span.nb { color: #AA22FF } /* Name.Builtin */ +span.nc { color: #0000FF } /* Name.Class */ +span.no { color: #DF3A01 } /* Name.Constant */ +span.nd { color: #AA22FF } /* Name.Decorator */ +span.ni { color: #999999; font-weight: bold } /* Name.Entity */ +span.ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +span.nf { color: #0000FF } /* Name.Function */ +span.nl { color: #A0A000 } /* Name.Label */ +span.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +span.nt { color: #008000; font-weight: bold } /* Name.Tag */ +span.nv { color: #B8860B } /* Name.Variable */ +span.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +span.w { color: #bbbbbb } /* Text.Whitespace */ +span.mf { color: #666666 } /* Literal.Number.Float */ +span.mh { color: #666666 } /* Literal.Number.Hex */ +span.mi { color: #666666 } /* Literal.Number.Integer */ +span.mo { color: #666666 } /* Literal.Number.Oct */ +span.sb { color: #BB4444 } /* Literal.String.Backtick */ +span.sc { color: #BB4444 } /* Literal.String.Char */ +span.sd { color: #BB4444; font-style: italic } /* Literal.String.Doc */ +span.s2 { color: #BB4444 } /* Literal.String.Double */ +span.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +span.sh { color: #BB4444 } /* Literal.String.Heredoc */ +span.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +span.sx { color: #008000 } /* Literal.String.Other */ +span.sr { color: #BB6688 } /* Literal.String.Regex */ +span.s1 { color: #BB4444 } /* Literal.String.Single */ +span.ss { color: #B8860B } /* Literal.String.Symbol */ +span.bp { color: #AA22FF } /* Name.Builtin.Pseudo */ +span.vc { color: #B8860B } /* Name.Variable.Class */ +span.vg { color: #B8860B } /* Name.Variable.Global */ +span.vi { color: #B8860B } /* Name.Variable.Instance */ +span.il { color: #666666 } /* Literal.Number.Integer.Long */ +