Logo Search packages:      
Sourcecode: faust version File versions  Download package

doc.cpp File Reference


Detailed Description

Implementation of documentation trees support and printing.

Author:
Karim Barkati and Yann Orlarey
Version:
1.0
Date:
2009

Definition in file doc.cpp.

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include <time.h>
#include <algorithm>
#include <functional>
#include <iostream>
#include <fstream>
#include <sstream>
#include <map>
#include <string>
#include <vector>
#include "ppbox.hh"
#include "prim2.hh"
#include "doc.hh"
#include "eval.hh"
#include "errormsg.hh"
#include "doc_Text.hh"
#include "sigprint.hh"
#include "propagate.hh"
#include "enrobage.hh"
#include "drawschema.hh"
#include "names.hh"
#include "simplify.hh"
#include "privatise.hh"
#include "recursivness.hh"
#include "sourcereader.hh"
#include "lateq.hh"
#include "doc_compile.hh"
#include "doc_lang.hh"
#include "doc_notice.hh"
#include "doc_autodoc.hh"
#include "compatibility.hh"

Go to the source code of this file.

Defines

#define MAXIDCHARS   5
 max numbers (characters) to represent ids (e.g. for directories).

Enumerations

enum  { langEN, langFR, langIT }

Functions

static void annotateSuperList (DocCompiler *DC, Tree superEqList)
 step 8. Annotate superlist.
static string calcDocEqnInitial (const string s)
static void calcEqnsNicknames (const vector< string > &eqNames, vector< string > &eqNicknames)
 step 3. Calculate nicknames.
static string calcNumberedName (const char *base, int i)
static int cholddir ()
static void collectDocEqns (const vector< Tree > &docBoxes, vector< Tree > &eqBoxes)
 step 0. Feed a vector.
static void collectEqSigs (const vector< Tree > &eqSigs, Tree &superEqList)
 step 7. Collect all signals in a superlist.
static void copyFaustSources (const char *projname, const vector< string > &pathnames)
vector< string > & docCodeSlicer (const string &faustfile, vector< string > &codeSlices)
Tree docDgm (Tree x)
Tree docEqn (Tree x)
Tree docLst ()
Tree docMtd (Tree x)
Tree docNtc ()
Tree docTxt (const char *name)
static bool doesFileBeginWithCode (const string &faustfile)
static void getBoxInputsAndOutputs (const Tree t, int &numInputs, int &numOutputs)
static struct tm * getCompilationDate ()
static void getCurrentDir ()
static void initCompilationDate ()
bool isDocDgm (Tree t, Tree &x)
bool isDocEqn (Tree t, Tree &x)
bool isDocLst (Tree t)
bool isDocMtd (Tree t, Tree &x)
bool isDocNtc (Tree t)
bool isDocTxt (Tree t0, const char **str)
bool isDocTxt (Tree t)
static char * legalFileName (const Tree t, int n, char *dst)
static int makedir (const char *dirname)
static void mapCompileDocEqnSigs (const vector< Tree > &eqSigs, const vector< int > &eqInputs, const vector< int > &eqOutputs, DocCompiler *DC, vector< Lateq * > &docCompiledEqnsVector)
 step 10. Compile equations.
static void mapEvalDocEqn (const vector< Tree > &eqBoxes, const Tree &env, vector< Tree > &evalEqBoxes)
 step 1. Evaluate boxes.
static void mapGetEqName (const vector< Tree > &evalEqBoxes, vector< string > &eqNames)
 step 2. Get boxes name.
static void mapPrepareEqSig (const vector< Tree > &evalEqBoxes, vector< int > &eqInputs, vector< int > &eqOutputs, vector< Tree > &eqSigs)
 step 4&5. Propagate and prepare signals.
static void mapSetSigNickname (const vector< string > &eqNicknames, const vector< int > &eqInputs, const vector< Tree > &eqSigs)
 step 6. Set signals nicknames.
static int mkchdir (const char *dirname)
static istream * openArchFile (const string &filename)
static void prepareDocEqns (const vector< Tree > &docBoxes, vector< Lateq * > &docCompiledEqnsVector)
 Caller function.
void printDoc (const char *projname, const char *docdev, const char *faustversion)
 The entry point to generate faust doc files.
static void printdocCodeSlices (const string &code, ostream &docout)
static void printdoccontent (const char *svgTopDir, const vector< Tree > &docVector, const string &faustversion, ostream &docout)
 Main documentator loop.
static void printDocDgm (const Tree expr, const char *svgTopDir, ostream &docout, int i)
 Doc diagrams handling.
static void printDocEqn (Lateq *ltq, ostream &docout)
static void printDocMetadata (const Tree expr, ostream &docout)
static void printfaustdocstamp (const string &faustversion, ostream &docout)
static void printfaustlisting (string &path, ostream &docout)
static void printfaustlistings (ostream &docout)
static void printlatexfooter (ostream &docout)
static void printlatexheader (istream &latexheader, const string &faustversion, ostream &docout)
static string rmExternalDoubleQuotes (const string &s)

Variables

Sym DOCDGM = symbol ("DocDgm")
Sym DOCEQN = symbol ("DocEqn")
Sym DOCLST = symbol ("DocLst")
Sym DOCMTD = symbol ("DocMtd")
Sym DOCNTC = symbol ("DocNtc")
Sym DOCTXT = symbol ("DocTxt")
static struct tm gCompilationDate
static string gCurrentDir
 Room to save current directory name.
bool gDetailsSwitch
static const char * gDocDevSuffix
 ".tex" (or .??? - used to choose output device).
string gDocLang
map< string, string > gDocMathStringMap
map< string, string > gDocMetadatasStringMap
string gDocName
 Contains the filename for out documentation.
vector< TreegDocVector
 Contains <mdoc> parsed trees: DOCTXT, DOCEQN, DOCDGM.
Tree gExpandedDefList
string gFaustDirectory
string gFaustSuperDirectory
string gFaustSuperSuperDirectory
static const string gLatexheaderfilename = "latexheader.tex"
bool gLstDependenciesSwitch = true
 mdoc listing management.
bool gLstDistributedSwitch = true
 mdoc listing management.
bool gLstMdocTagsSwitch = true
 mdoc listing management.
string gMasterDocument
string gMasterName
map< Tree, set< Tree > > gMetaDataSet
SourceReader gReader
bool gStripDocSwitch


Generated by  Doxygen 1.6.0   Back to index