#include <iostream>#include <string>#include <set>#include <map>#include <cstdlib>#include "doc_autodoc.hh"#include "tlib.hh"#include "boxes.hh"#include "doc.hh"Go to the source code of this file.
Functions | |
| static void | initDocAutodocKeySet () |
| Initialize gDocAutodocKeySet, a set containing all the keywords. | |
| void | declareAutoDoc () |
| Declare an automatic documentation. | |
| void | initDocAutodoc () |
| Dispatch initialization of autodoc container. | |
| static void | printDocAutodocStringMapContent () |
| Simple trace function. | |
Variables | |
| SourceReader | gReader |
| map< string, string > | gDocAutodocStringMap |
| set< string > | gDocAutodocKeySet |
| void declareAutoDoc | ( | ) |
Declare an automatic documentation.
This function simulates a default documentation : if no <mdoc> tag was found in the input faust file, and yet the '-math' option was called, then print a complete 'process' doc.
Definition at line 58 of file doc_autodoc.cpp.
References boxIdent(), cons(), declareDoc(), docDgm(), docEqn(), docLst(), docNtc(), docTxt(), gDocAutodocStringMap, SourceReader::listSrcFiles(), and nil.
Referenced by printDoc().
00059 { 00060 Tree autodoc = nil; 00061 Tree process = boxIdent("process"); 00062 00063 string autoEquationTxt = "\n" + gDocAutodocStringMap["autoeqntitle"] + "\n\n"; 00064 autoEquationTxt += gDocAutodocStringMap["autoeqntext"] + "\n"; 00065 autodoc = cons(docTxt(autoEquationTxt.c_str()), autodoc); 00066 autodoc = cons(docEqn(process), autodoc); 00067 00068 string autoDiagramTxt = "\n" + gDocAutodocStringMap["autodgmtitle"] + "\n\n"; 00069 autoDiagramTxt += gDocAutodocStringMap["autodgmtext"] + "\n"; 00070 autodoc = cons(docTxt(autoDiagramTxt.c_str()), autodoc); 00071 autodoc = cons(docDgm(process), autodoc); 00072 00073 string autoNoticeTxt = "\n" + gDocAutodocStringMap["autontctitle"] + "\n\n"; 00074 autoNoticeTxt += gDocAutodocStringMap["autontctext"] + "\n"; 00075 autodoc = cons(docTxt(autoNoticeTxt.c_str()), autodoc); 00076 autodoc = cons(docNtc(), autodoc); 00077 00078 string autoListingTxt; 00079 vector<string> pathnames = gReader.listSrcFiles(); 00080 if(pathnames.size() > 1) { 00081 autoListingTxt = "\n" + gDocAutodocStringMap["autolsttitle2"] + "\n\n"; 00082 autoListingTxt += gDocAutodocStringMap["autolsttext2"] + "\n"; 00083 } else { 00084 autoListingTxt = "\n" + gDocAutodocStringMap["autolsttitle1"] + "\n\n"; 00085 autoListingTxt += gDocAutodocStringMap["autolsttext1"] + "\n"; 00086 } 00087 autodoc = cons(docTxt(autoListingTxt.c_str()), autodoc); 00088 autodoc = cons(docLst(), autodoc); 00089 00090 declareDoc(autodoc); 00091 }
| void initDocAutodoc | ( | ) |
Dispatch initialization of autodoc container.
Definition at line 97 of file doc_autodoc.cpp.
References initDocAutodocKeySet().
Referenced by loadTranslationFile().
00098 { 00099 initDocAutodocKeySet(); 00100 }
| static void initDocAutodocKeySet | ( | ) | [static] |
Initialize gDocAutodocKeySet, a set containing all the keywords.
Definition at line 112 of file doc_autodoc.cpp.
References gDocAutodocKeySet.
Referenced by initDocAutodoc().
00112 { 00113 00114 gDocAutodocKeySet.insert("autoeqntitle"); 00115 gDocAutodocKeySet.insert("autoeqntext"); 00116 00117 gDocAutodocKeySet.insert("autodgmtitle"); 00118 gDocAutodocKeySet.insert("autodgmtext"); 00119 00120 gDocAutodocKeySet.insert("autontctitle"); 00121 gDocAutodocKeySet.insert("autontctext"); 00122 00123 gDocAutodocKeySet.insert("autolsttitle1"); 00124 gDocAutodocKeySet.insert("autolsttext1"); 00125 00126 gDocAutodocKeySet.insert("autolsttitle2"); 00127 gDocAutodocKeySet.insert("autolsttext2"); 00128 }
| static void printDocAutodocStringMapContent | ( | ) | [static] |
Simple trace function.
Definition at line 134 of file doc_autodoc.cpp.
References gDocAutodocStringMap.
00134 { 00135 bool trace = false; 00136 if(trace) { 00137 cout << "gDocAutodocStringMap.size() = " << gDocAutodocStringMap.size() << endl; 00138 map<string,string>::iterator it; 00139 int i = 1; 00140 for(it = gDocAutodocStringMap.begin(); it!=gDocAutodocStringMap.end(); ++it) 00141 cout << i++ << ".\tgDocNoticeStringMap[" << it->first << "] \t= '" << it->second << "'" << endl; 00142 } 00143 }
| set<string> gDocAutodocKeySet |
Definition at line 38 of file doc_autodoc.cpp.
Referenced by initDocAutodocKeySet(), and storePair().
| map<string, string> gDocAutodocStringMap |
Definition at line 37 of file doc_autodoc.cpp.
Referenced by declareAutoDoc(), importDocStrings(), printDocAutodocStringMapContent(), and storePair().
1.6.3