doc.hh File Reference

#include "tlib.hh"
#include "eval.hh"
Include dependency graph for doc.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Tree docTxt (const char *)
Tree docEqn (Tree x)
Tree docDgm (Tree x)
Tree docNtc ()
Tree docLst ()
bool isDocTxt (Tree t)
bool isDocTxt (Tree t, const char **)
bool isDocEqn (Tree t, Tree &x)
bool isDocDgm (Tree t, Tree &x)
bool isDocNtc (Tree t)
bool isDocLst (Tree t)
void printDoc (const char *projname, const char *docdev, const char *faustversion)
 The entry point to generate faust doc files.

Function Documentation

Tree docDgm ( Tree  x  ) 

Definition at line 184 of file doc.cpp.

References tree().

Referenced by declareAutoDoc(), and yyparse().

00184 { return tree(DOCDGM, x);       }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree docEqn ( Tree  x  ) 

Definition at line 180 of file doc.cpp.

References tree().

Referenced by declareAutoDoc(), and yyparse().

00180 { return tree(DOCEQN, x);       }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree docLst (  ) 

Definition at line 192 of file doc.cpp.

References tree().

Referenced by declareAutoDoc(), and yyparse().

00192 { return tree(DOCLST);          }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree docNtc (  ) 

Definition at line 188 of file doc.cpp.

References tree().

Referenced by declareAutoDoc(), and yyparse().

00188 { return tree(DOCNTC);          }

Here is the call graph for this function:

Here is the caller graph for this function:

Tree docTxt ( const char *   ) 

Definition at line 166 of file doc.cpp.

References symbol(), and tree().

Referenced by declareAutoDoc(), and yyparse().

00166 { return tree( DOCTXT, tree(symbol(name)) ); }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isDocDgm ( Tree  t,
Tree x 
)

Definition at line 185 of file doc.cpp.

References isTree().

Referenced by printdoccontent().

00185 { return isTree(t, DOCDGM, x);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isDocEqn ( Tree  t,
Tree x 
)

Definition at line 181 of file doc.cpp.

References isTree().

Referenced by collectDocEqns(), and printdoccontent().

00181 { return isTree(t, DOCEQN, x);  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isDocLst ( Tree  t  ) 

Definition at line 193 of file doc.cpp.

References isTree().

Referenced by printdoccontent().

00193 { return isTree(t, DOCLST);     }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isDocNtc ( Tree  t  ) 

Definition at line 189 of file doc.cpp.

References isTree().

Referenced by printdoccontent().

00189 { return isTree(t, DOCNTC);     }

Here is the call graph for this function:

Here is the caller graph for this function:

bool isDocTxt ( Tree  t,
const char **   
)

Definition at line 168 of file doc.cpp.

References isSym(), isTree(), name(), and CTree::node().

00169 {
00170     Tree t1; Sym s;
00171     if ( isTree(t0, DOCTXT, t1) && isSym(t1->node(), &s) ) {
00172         *str = name(s);
00173         return true;
00174     } else {
00175         return false;
00176     }
00177 }

Here is the call graph for this function:

bool isDocTxt ( Tree  t  ) 

Definition at line 167 of file doc.cpp.

References CTree::node().

Referenced by printdoccontent().

00167 { return t->node() == Node(DOCTXT); }

Here is the call graph for this function:

Here is the caller graph for this function:

void printDoc ( const char *  projname,
const char *  docdev,
const char *  faustversion 
)

The entry point to generate faust doc files.

The entry point to generate the output LaTeX file, stored in the directory "<projname>-math/". This file eventually references images for diagrams, generated in SVG subdirectories. The device system was adapted from drawSchema's device system.

Parameters:
[in] projname Basename of the new doc directory ("*-math").
[in] docdev The doc device; only ".tex" is supported for the moment.
[in] faustversion The current version of this Faust compiler.

File stuff : create doc directories and a tex file.

Create THE mathdoc tex file.

Init and load translation file.

Simulate a default doc if no <mdoc> tag detected.

Printing stuff : in the '.tex' ouptut file, eventually including SVG files.

< Faust version and compilation date (comment).

< Static LaTeX header (packages and setup).

< Dynamic visible header (maketitle).

< Generate math contents (main stuff!).

< Static LaTeX footer.

Definition at line 216 of file doc.cpp.

References cholddir(), copyFaustSources(), declareAutoDoc(), gDocDevSuffix, gDocLang, gDocName, gDocVector, gLatexheaderfilename, SourceReader::listSrcFiles(), loadTranslationFile(), makedir(), mkchdir(), openArchFile(), printdoccontent(), printdocheader(), printfaustdocstamp(), printlatexfooter(), printlatexheader(), and subst().

Referenced by main().

00217 {
00218     gDocDevSuffix = docdev;
00219     
00221     //cerr << "Documentator : printDoc : gFaustDirectory = '" << gFaustDirectory << "'" << endl;
00222     //cerr << "Documentator : printDoc : gFaustSuperDirectory = '" << gFaustSuperDirectory << "'" << endl;
00223     //cerr << "Documentator : printDoc : gFaustSuperSuperDirectory = '" << gFaustSuperSuperDirectory << "'" << endl;
00224     //cerr << "Documentator : printDoc : gCurrentDir = '" << gCurrentDir << "'" << endl;
00225     
00226     makedir(projname);          // create a top directory to store files
00227     
00228     string svgTopDir = subst("$0/svg", projname);
00229     makedir(svgTopDir.c_str()); // create a directory to store svg-* subdirectories.
00230     
00231     string cppdir = subst("$0/cpp", projname);
00232     makedir(cppdir.c_str());    // create a cpp directory.
00233     
00234     string pdfdir = subst("$0/pdf", projname);
00235     makedir(pdfdir.c_str());    // create a pdf directory.
00236     
00237     /* Copy all Faust source files into an 'src' sub-directory. */
00238     vector<string> pathnames = gReader.listSrcFiles();
00239     copyFaustSources(projname, pathnames);
00240     
00241     string texdir = subst("$0/tex", projname);
00242     mkchdir(texdir.c_str());    // create a directory and move into.
00243 
00245     ofstream docout(subst("$0.$1", gDocName, docdev).c_str());
00246     cholddir();                 // return to current directory
00247     
00249     loadTranslationFile(gDocLang);
00250     
00252     if (gDocVector.empty()) { declareAutoDoc(); }   
00253     
00255     printfaustdocstamp(faustversion, docout);                       
00256     istream* latexheader = openArchFile(gLatexheaderfilename);
00257     printlatexheader(*latexheader, docout);                         
00258     printdocheader(docout);                                         
00259     printdoccontent(svgTopDir.c_str(), gDocVector, faustversion, docout);       
00260     printlatexfooter(docout);                                       
00261     
00262 }

Here is the call graph for this function:

Here is the caller graph for this function:

Generated on Thu Apr 29 00:00:04 2010 for FAUST compiler by  doxygen 1.6.3