FAUST compiler  0.9.9.6b8
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Lateq Class Reference

#include <lateq.hh>

Public Member Functions

 Lateq (const int &numInputs, const int &numOutputs)
 
 ~Lateq ()
 
void addInputSigFormula (const string &str)
 Add a line of a latex equation code corresponding to a signal. More...
 
void addConstSigFormula (const string &str)
 
void addParamSigFormula (const string &str)
 
void addStoreSigFormula (const string &str)
 
void addRecurSigFormula (const string &str)
 
void addRDTblSigFormula (const string &str)
 
void addRWTblSigFormula (const string &str)
 
void addSelectSigFormula (const string &str)
 
void addPrefixSigFormula (const string &str)
 
void addOutputSigFormula (const string &str)
 
void addUISigFormula (const string &path, const string &str)
 
void println (ostream &docout)
 Top-level method to print a whole set of compiled LaTeX formulas. More...
 
int inputs () const
 
int outputs () const
 

Private Member Functions

string makeItemTitle (const unsigned int formulasListSize, const string &titleName)
 
string makeSignamesList (const list< string > &formulasList, const string &ending)
 
string makeSignamesList (const vector< list< string > > &formulasListsVector, const string &ending)
 For all "internal" signals. More...
 
string getSigName (const string &s)
 
string makeSigDomain (const list< string > &formulasList)
 
string getUISigName (const string &s)
 
char getUISigType (const string &s)
 
vector< list< string > > makeUISignamesVector (const multimap< string, string > &field)
 
void printOneLine (const string &section, ostream &docout)
 Print a sorted list of input signals names ("x_i"), on a single line, separated by commas. More...
 
void printHierarchy (const string &section, multimap< string, string > &field, ostream &docout)
 Print formulas for user interface signals. More...
 
void printDGroup (const string &section, list< string > &field, ostream &docout)
 Print a dgroup environment to auto-break long formulas. More...
 
void printMath (const string &section, list< string > &field, ostream &docout)
 Print formulas for select2, select3 and prefix signals. More...
 
bool hasNotOnlyEmptyKeys (multimap< string, string > &mm)
 Find out whether all keys of the multimap are empty or not. More...
 
void tab (int n, ostream &docout) const
 Simple handling of indentation. More...
 

Private Attributes

const int fNumInputs
 
const int fNumOutputs
 
list< string > fInputSigsFormulas
 LaTeX formulas to print. More...
 
list< string > fConstSigsFormulas
 
list< string > fParamSigsFormulas
 
list< string > fStoreSigsFormulas
 
list< string > fRecurSigsFormulas
 
list< string > fRDTblSigsFormulas
 
list< string > fRWTblSigsFormulas
 
list< string > fSelectSigsFormulas
 
list< string > fPrefixSigsFormulas
 
list< string > fOutputSigsFormulas
 
multimap< string, string > fUISigsFormulas
 

Detailed Description

Definition at line 56 of file lateq.hh.

Constructor & Destructor Documentation

Lateq::Lateq ( const int &  numInputs,
const int &  numOutputs 
)
inline

Definition at line 60 of file lateq.hh.

61  : fNumInputs(numInputs), fNumOutputs(numOutputs)
62  {}
const int fNumOutputs
Definition: lateq.hh:89
const int fNumInputs
Definition: lateq.hh:88
Lateq::~Lateq ( )
inline

Definition at line 64 of file lateq.hh.

64 {}

Member Function Documentation

void Lateq::addConstSigFormula ( const string &  str)
inline

Definition at line 68 of file lateq.hh.

Referenced by DocCompiler::generateVariableStore().

68 { fConstSigsFormulas.push_back(str); }
list< string > fConstSigsFormulas
Definition: lateq.hh:93

Here is the caller graph for this function:

void Lateq::addInputSigFormula ( const string &  str)
inline

Add a line of a latex equation code corresponding to a signal.

Definition at line 67 of file lateq.hh.

Referenced by DocCompiler::generateInput().

67 { fInputSigsFormulas.push_back(str); }
list< string > fInputSigsFormulas
LaTeX formulas to print.
Definition: lateq.hh:92

Here is the caller graph for this function:

void Lateq::addOutputSigFormula ( const string &  str)
inline

Definition at line 76 of file lateq.hh.

Referenced by DocCompiler::compileLateq(), and DocCompiler::generateOutput().

76 { fOutputSigsFormulas.push_back(str); }
list< string > fOutputSigsFormulas
Definition: lateq.hh:101

Here is the caller graph for this function:

void Lateq::addParamSigFormula ( const string &  str)
inline

Definition at line 69 of file lateq.hh.

Referenced by DocCompiler::generateVariableStore().

69 { fParamSigsFormulas.push_back(str); }
list< string > fParamSigsFormulas
Definition: lateq.hh:94

Here is the caller graph for this function:

void Lateq::addPrefixSigFormula ( const string &  str)
inline

Definition at line 75 of file lateq.hh.

Referenced by DocCompiler::generatePrefix().

75 { fPrefixSigsFormulas.push_back(str); }
list< string > fPrefixSigsFormulas
Definition: lateq.hh:100

Here is the caller graph for this function:

void Lateq::addRDTblSigFormula ( const string &  str)
inline

Definition at line 72 of file lateq.hh.

Referenced by DocCompiler::generateDocConstantTbl().

72 { fRDTblSigsFormulas.push_back(str); }
list< string > fRDTblSigsFormulas
Definition: lateq.hh:97

Here is the caller graph for this function:

void Lateq::addRecurSigFormula ( const string &  str)
inline

Definition at line 71 of file lateq.hh.

Referenced by DocCompiler::generateDelayLine(), and DocCompiler::generateDelayVecNoTemp().

71 { fRecurSigsFormulas.push_back(str); }
list< string > fRecurSigsFormulas
Definition: lateq.hh:96

Here is the caller graph for this function:

void Lateq::addRWTblSigFormula ( const string &  str)
inline

Definition at line 73 of file lateq.hh.

Referenced by DocCompiler::generateDocWriteTbl().

73 { fRWTblSigsFormulas.push_back(str); }
list< string > fRWTblSigsFormulas
Definition: lateq.hh:98

Here is the caller graph for this function:

void Lateq::addSelectSigFormula ( const string &  str)
inline

Definition at line 74 of file lateq.hh.

Referenced by DocCompiler::generateSelect2(), and DocCompiler::generateSelect3().

74 { fSelectSigsFormulas.push_back(str); }
list< string > fSelectSigsFormulas
Definition: lateq.hh:99

Here is the caller graph for this function:

void Lateq::addStoreSigFormula ( const string &  str)
inline

Definition at line 70 of file lateq.hh.

Referenced by DocCompiler::generateVariableStore().

70 { fStoreSigsFormulas.push_back(str); }
list< string > fStoreSigsFormulas
Definition: lateq.hh:95

Here is the caller graph for this function:

void Lateq::addUISigFormula ( const string &  path,
const string &  str 
)
inline

Definition at line 77 of file lateq.hh.

Referenced by DocCompiler::generateButton(), DocCompiler::generateCheckbox(), DocCompiler::generateHSlider(), DocCompiler::generateNumEntry(), and DocCompiler::generateVSlider().

77 { fUISigsFormulas.insert(make_pair(path, str)); };
multimap< string, string > fUISigsFormulas
Definition: lateq.hh:102

Here is the caller graph for this function:

string Lateq::getSigName ( const string &  s)
private

< Looking for a left member.

< Strip "(t)" argument if exists.

< Strip "[t]" argument if exists (for tables).

< Strip indice if exists.

Definition at line 206 of file lateq.cpp.

Referenced by makeSigDomain().

207 {
208  size_t found;
209  string signame;
210 
211  found = s.find(" =");
212  if (found != string::npos) {
213  signame = s.substr (0, found);
214  }
215  found = s.find("(t)");
216  if (found != string::npos) {
217  signame = s.substr (0, found);
218  }
219  found = signame.find("[t]");
220  if (found != string::npos) {
221  signame = s.substr (0, found);
222  }
223  found = signame.find_last_of("_");
224  if (found != string::npos) {
225  signame = signame.substr (0, found);
226  }
227 
228  return signame;
229 }

Here is the caller graph for this function:

string Lateq::getUISigName ( const string &  s)
private

< Looking for a UI signal name "{u_?}_{i}(t)".

Definition at line 261 of file lateq.cpp.

Referenced by makeUISignamesVector().

262 {
263  size_t found;
264  string signame;
265 
266  found = s.find("${u_");
267  if (found != string::npos) {
268  signame = s.substr (found+1, 12);
269  }
270 
271  return signame;
272 }

Here is the caller graph for this function:

char Lateq::getUISigType ( const string &  s)
private

< Looking for a UI signal name "{u_?}_{i}".

Definition at line 275 of file lateq.cpp.

Referenced by makeUISignamesVector().

276 {
277  size_t found;
278  char sigtype = '0';
279 
280  found = s.find("${u_");
281  if (found != string::npos) {
282  sigtype = s.at (found+4);
283  }
284 
285  return sigtype;
286 }

Here is the caller graph for this function:

bool Lateq::hasNotOnlyEmptyKeys ( multimap< string, string > &  mm)
private

Find out whether all keys of the multimap are empty or not.

In other words : Check that some UIs have a path (non empty).

In other other words : Check that all UIs are not at top-level.

< Look for pairs with empty keys.

Definition at line 454 of file lateq.cpp.

Referenced by printHierarchy().

455 {
456  typedef multimap<string,string>::iterator MMIT;
457  pair<MMIT,MMIT> range;
458  range = mm.equal_range("");
459  bool hasOnlyEmptyPaths = (range.first == mm.begin()) && (range.second == mm.end());
460  return !hasOnlyEmptyPaths;
461 }

Here is the caller graph for this function:

int Lateq::inputs ( ) const
inline

Definition at line 82 of file lateq.hh.

Referenced by DocCompiler::generateInput().

82 { return fNumInputs; }
const int fNumInputs
Definition: lateq.hh:88

Here is the caller graph for this function:

string Lateq::makeItemTitle ( const unsigned int  formulasListSize,
const string &  titleName 
)
private

Definition at line 143 of file lateq.cpp.

References gDocMathStringMap.

Referenced by println().

144 {
145  string item = "\\item ";
146 
147  /* Plural handling for titles of sub-sets of formulas. */
148  string title = formulasListSize > 1 ? gDocMathStringMap[titleName + "2"] : gDocMathStringMap[titleName + "1"];
149 
150  return item + title;
151 }
map< string, string > gDocMathStringMap
Definition: lateq.cpp:51

Here is the caller graph for this function:

string Lateq::makeSigDomain ( const list< string > &  formulasList)
private

< No indices for single input neither single output.

< Indices "1" for all other single signal.

Definition at line 154 of file lateq.cpp.

References gDocMathStringMap, getSigName(), and to_string().

Referenced by makeSignamesList().

155 {
156  string signame = "";
157  string sigDomain = "";
158 
159  if (formulasList.size() > 0) {
160  string firstEq = *(formulasList.begin());
161  signame = getSigName(firstEq);
162 
163  if(formulasList.size() > 1) {
164  sigDomain = " $" + signame + "_i$ " + gDocMathStringMap["for"] + " $i \\in [1," + to_string(formulasList.size()) + "]$";
165  } else {
166  if(signame == "x" || signame == "y") {
167  sigDomain = " $" + signame + "$";
168  } else {
169  sigDomain = " $" + signame + "_1$";
170  }
171  }
172  } else {
173  sigDomain = gDocMathStringMap["emptyformulafield"];
174  }
175  return sigDomain;
176 }
map< string, string > gDocMathStringMap
Definition: lateq.cpp:51
string getSigName(const string &s)
Definition: lateq.cpp:206
std::string to_string(const T &t)
Definition: lateq.cpp:60

Here is the call graph for this function:

Here is the caller graph for this function:

string Lateq::makeSignamesList ( const list< string > &  formulasList,
const string &  ending 
)
private

Definition at line 179 of file lateq.cpp.

References gDocMathStringMap, and makeSigDomain().

Referenced by println().

180 {
181  if (formulasList.size() > 0) {
182  return makeSigDomain(formulasList) + " " + ending;
183  } else {
184  return " (" + gDocMathStringMap["emptyformulafield"] + ")";
185  }
186 }
string makeSigDomain(const list< string > &formulasList)
Definition: lateq.cpp:154
map< string, string > gDocMathStringMap
Definition: lateq.cpp:51

Here is the call graph for this function:

Here is the caller graph for this function:

string Lateq::makeSignamesList ( const vector< list< string > > &  formulasListsVector,
const string &  ending 
)
private

For all "internal" signals.

Definition at line 189 of file lateq.cpp.

References gDocMathStringMap, and makeSigDomain().

190 {
191  if (formulasListsVector.size() > 0) {
192  vector<list<string> >::const_iterator it;
193  string signames = "";
194  string sep = " ";
195  for (it = formulasListsVector.begin(); it != formulasListsVector.end(); ++it) {
196  signames += sep + makeSigDomain(*it);
197  (it != (formulasListsVector.end() - 2)) ? sep = ", " : sep = " " + gDocMathStringMap["and"] + " ";
198  }
199  return signames + " " + ending;
200  } else {
201  return " (" + gDocMathStringMap["emptyformulafield"] + ")";
202  }
203 }
string makeSigDomain(const list< string > &formulasList)
Definition: lateq.cpp:154
map< string, string > gDocMathStringMap
Definition: lateq.cpp:51

Here is the call graph for this function:

vector< list< string > > Lateq::makeUISignamesVector ( const multimap< string, string > &  field)
private

Definition at line 232 of file lateq.cpp.

References getUISigName(), and getUISigType().

Referenced by println().

233 {
234  map<char,unsigned int> uiTypesMap;
235  vector<list<string> > uiSignamesVector;
236  unsigned int vIndex = 0;
237 
238  multimap<string,string>::const_iterator it;
239 
240  for (it = field.begin(); it != field.end(); ++it) {
241  char type = getUISigType(it->second);
242  string signame = getUISigName(it->second);
243 
244  map<char,unsigned int>::iterator uiTypesIt;
245  uiTypesIt = uiTypesMap.find(type);
246  if( uiTypesIt != uiTypesMap.end()) {
247  uiSignamesVector[uiTypesMap[uiTypesIt->second]].push_back(signame);
248  } else {
249  ++vIndex;
250  uiTypesMap.insert(pair<char,unsigned int>(type, vIndex));
251  list<string>* tmpList = new(list<string>);
252  tmpList->push_back(signame);
253  uiSignamesVector.push_back(*tmpList);
254  }
255  }
256 
257  return uiSignamesVector;
258 }
string getUISigName(const string &s)
Definition: lateq.cpp:261
char getUISigType(const string &s)
Definition: lateq.cpp:275

Here is the call graph for this function:

Here is the caller graph for this function:

int Lateq::outputs ( ) const
inline

Definition at line 83 of file lateq.hh.

Referenced by DocCompiler::compileLateq(), and DocCompiler::generateOutput().

83 { return fNumOutputs; }
const int fNumOutputs
Definition: lateq.hh:89

Here is the caller graph for this function:

void Lateq::printDGroup ( const string &  section,
list< string > &  field,
ostream &  docout 
)
private

Print a dgroup environment to auto-break long formulas.

Remarks
The "dgroup" and "dmath" environments belong to the "breqn" LaTeX package. The stared variants "dgroup*" and "dmath*" force unnumbered equations.
Parameters
[in]sectionThe title to print for these formulas.
[in]fieldThe list of LaTeX formulas.
[out]docoutThe LaTeX output file to print into.

Definition at line 319 of file lateq.cpp.

References tab().

Referenced by println().

320 {
321  if (field.size() > 0) {
322  docout << section << endl;
323  tab(1,docout); docout << "\\begin{dgroup*}" << endl;
324  list<string>::const_iterator s;
325  for (s = field.begin(); s != field.end(); ++s) {
326  tab(2,docout); docout << "\\begin{" << "dmath*" << "}" << endl;
327  tab(3,docout); docout << "\t" << *s << endl;
328  tab(2,docout); docout << "\\end{" << "dmath*" << "}" << endl;
329  }
330  tab(1,docout); docout << "\\end{dgroup*}" << endl;
331  docout << endl;
332  }
333 }
void tab(int n, ostream &docout) const
Simple handling of indentation.
Definition: lateq.cpp:439

Here is the call graph for this function:

Here is the caller graph for this function:

void Lateq::printHierarchy ( const string &  section,
multimap< string, string > &  field,
ostream &  docout 
)
private

Print formulas for user interface signals.

Parameters
[in]sectionThe title to print for these formulas.
[in]fieldThis multimap contains pairs :
  1. the path_string is printed as a sub-title item, when new;
  2. each latex_string is printed as a preformated row of the supertabular environment (needed to handle long tables).
[out]docoutThe LaTeX output file to print into.
Remarks
To decide when one should avoid to print an itemize environment, a "global" strategy is applied : in the particular case where ONLY empty paths were detected in the WHOLE container (all UIs are at the top level). In this particular case, UI strings are directly printed, and their (empty!) path is ignored... In the other case, we have to print an itemize environment and manage paths printing (empty AND non-empty paths) as items.
See also
DocCompiler::prepareIntervallicUI
DocCompiler::prepareBinaryUI

< Manage itemize printing for pathnames.

< Manage latex indentation offset.

Definition at line 359 of file lateq.cpp.

References gDocMathStringMap, hasNotOnlyEmptyKeys(), and tab().

Referenced by println().

360 {
361  if (field.size() > 0) {
362  docout << section << endl;
363 
364  bool hasSomePaths = hasNotOnlyEmptyKeys(field);
365  unsigned int n;
366 
367  if (hasSomePaths) {
368  tab(0,docout); docout << "\\begin{itemize}" << endl;
369  n = 1;
370  } else {
371  n = 0;
372  }
373 
374  multimap<string,string>::iterator it;
375  string uidir = "improbable_starting_dirname";
376  bool startFlag = true;
377 
378  for (it = field.begin(); it != field.end(); ++it) {
379  /* Manage supertabular environment bounds and pathname printing. */
380  if (it->first != uidir) {
381  if (!startFlag) {
382  tab(n+2,docout); docout << "\\end{supertabular}" << endl;
383  tab(n+1,docout); docout << "\\end{center}" << endl;
384  } else {
385  startFlag = false;
386  }
387  if (hasSomePaths) {
388  /* Print the current pathname if new and if pathnames requested. */
389  if (it->first != "") {
390  tab(n+0,docout); docout << "\\item \\textsf{" << it->first << "}" << endl;
391  } else {
392  tab(n+0,docout); docout << "\\item \\emph{" << gDocMathStringMap["rootlevel"] << "}" << endl;
393  }
394  }
395  tab(n+1,docout); docout << "\\begin{center}" << endl;
396  tab(n+2,docout); docout << "\\begin{supertabular}{lll}" << endl;
397  }
398  /* Print the current formula. */
399  tab(n+3,docout); docout << it->second << endl;
400  uidir = it->first;
401  }
402  tab(n+2,docout); docout << "\\end{supertabular}" << endl;
403  tab(n+1,docout); docout << "\\end{center}" << endl;
404  if (hasSomePaths) {
405  tab(n+0,docout); docout << "\\end{itemize}" << endl;
406  }
407  docout << endl;
408  }
409 }
void tab(int n, ostream &docout) const
Simple handling of indentation.
Definition: lateq.cpp:439
map< string, string > gDocMathStringMap
Definition: lateq.cpp:51
bool hasNotOnlyEmptyKeys(multimap< string, string > &mm)
Find out whether all keys of the multimap are empty or not.
Definition: lateq.cpp:454

Here is the call graph for this function:

Here is the caller graph for this function:

void Lateq::println ( ostream &  docout)

Top-level method to print a whole set of compiled LaTeX formulas.

Top-level method to print a whole set of compiled LaTeX formulas, corresponding to an <equation> faustdoc tag.

Remarks
These formulas must have been previously compiled, via the DocCompile class, and stored in Lateq fields as LaTeX strings.

Definition at line 83 of file lateq.cpp.

References compLateqIndexes(), fConstSigsFormulas, fInputSigsFormulas, fOutputSigsFormulas, fParamSigsFormulas, fPrefixSigsFormulas, fRDTblSigsFormulas, fRecurSigsFormulas, fRWTblSigsFormulas, fSelectSigsFormulas, fStoreSigsFormulas, fUISigsFormulas, gDocMathStringMap, makeItemTitle(), makeSignamesList(), makeUISignamesVector(), printDGroup(), printHierarchy(), printMath(), printOneLine(), and to_string().

Referenced by printDocEqn().

84 {
85  /* 1. Make titles of sub-sets of formulas. */
86  string suchthat = gDocMathStringMap["suchthat"];
87 
88  string sInputs = makeItemTitle((const unsigned int)fInputSigsFormulas.size(), "inputsigtitle") + makeSignamesList(fInputSigsFormulas, "");
89  string sOutputs = makeItemTitle((const unsigned int)fOutputSigsFormulas.size(), "outputsigtitle") + makeSignamesList(fOutputSigsFormulas, suchthat);
90  string sConstants = makeItemTitle((const unsigned int)fConstSigsFormulas.size(), "constsigtitle") + makeSignamesList(fConstSigsFormulas, suchthat);
91 
92  vector<list<string> > UISignamesVector = makeUISignamesVector(fUISigsFormulas);
93  string sUIElements = makeItemTitle((const unsigned int)fUISigsFormulas.size(), "uisigtitle") + makeSignamesList(UISignamesVector, suchthat);
94 
95  unsigned int internalSigsCount = (unsigned int)(fParamSigsFormulas.size() + fStoreSigsFormulas.size() + fRecurSigsFormulas.size() + fRDTblSigsFormulas.size() + fRWTblSigsFormulas.size() + fSelectSigsFormulas.size() + fPrefixSigsFormulas.size());
96 
97  vector<list<string> > internalSigsFormulasList;
98  if( ! fParamSigsFormulas.empty() ) internalSigsFormulasList.push_back(fParamSigsFormulas);
99  if( ! fStoreSigsFormulas.empty() ) internalSigsFormulasList.push_back(fStoreSigsFormulas);
100  if( ! fRecurSigsFormulas.empty() ) internalSigsFormulasList.push_back(fRecurSigsFormulas);
101  if( ! fRDTblSigsFormulas.empty() ) internalSigsFormulasList.push_back(fRDTblSigsFormulas);
102  if( ! fRWTblSigsFormulas.empty() ) internalSigsFormulasList.push_back(fRWTblSigsFormulas);
103  if( ! fSelectSigsFormulas.empty() ) internalSigsFormulasList.push_back(fSelectSigsFormulas);
104  if( ! fPrefixSigsFormulas.empty() ) internalSigsFormulasList.push_back(fPrefixSigsFormulas);
105 
106  string sInternals = makeItemTitle(internalSigsCount, "intermedsigtitle") + makeSignamesList(internalSigsFormulasList, suchthat);
107 
108  /* 2. Successively print each Lateq field containing LaTeX formulas, with a title. */
109 
110  docout << endl << gDocMathStringMap["lateqcomment"] << endl;
111  docout << "\\begin{enumerate}" << endl << endl;
112 
113  printDGroup (sOutputs, fOutputSigsFormulas, docout);
114  printOneLine (sInputs, docout);
115  const string outputsTitle = "\\item " + sOutputs + "\\ $y_i$\\ " + gDocMathStringMap["for"] + " $i \\in [1," + to_string(fOutputSigsFormulas.size()) + "]$: ";
116  printHierarchy (sUIElements, fUISigsFormulas, docout);
117 
118  /* The "Internal signals" item gather several fields, like a "super-item"... */
119  if( internalSigsCount > 0 ) {
120  docout << sInternals;
121  }
123  printDGroup ("", fParamSigsFormulas, docout);
124  printDGroup ("", fStoreSigsFormulas, docout);
125  printDGroup ("", fRecurSigsFormulas, docout);
126  printDGroup ("", fRDTblSigsFormulas, docout);
127  printMath ("", fRWTblSigsFormulas, docout);
128  printMath ("", fSelectSigsFormulas, docout);
129  printMath ("", fPrefixSigsFormulas, docout);
130 
131  printDGroup (sConstants, fConstSigsFormulas, docout);
132 
133  docout << "\\end{enumerate}" << endl << endl;
134 }
list< string > fParamSigsFormulas
Definition: lateq.hh:94
void printMath(const string &section, list< string > &field, ostream &docout)
Print formulas for select2, select3 and prefix signals.
Definition: lateq.cpp:423
list< string > fRWTblSigsFormulas
Definition: lateq.hh:98
list< string > fInputSigsFormulas
LaTeX formulas to print.
Definition: lateq.hh:92
multimap< string, string > fUISigsFormulas
Definition: lateq.hh:102
string makeSignamesList(const list< string > &formulasList, const string &ending)
Definition: lateq.cpp:179
string makeItemTitle(const unsigned int formulasListSize, const string &titleName)
Definition: lateq.cpp:143
static bool compLateqIndexes(const string &s1, const string &s2)
Compare indexes of two LaTeX strings, for the sort() method applied on list fields...
Definition: lateq.cpp:483
void printOneLine(const string &section, ostream &docout)
Print a sorted list of input signals names ("x_i"), on a single line, separated by commas...
Definition: lateq.cpp:302
list< string > fStoreSigsFormulas
Definition: lateq.hh:95
map< string, string > gDocMathStringMap
Definition: lateq.cpp:51
vector< list< string > > makeUISignamesVector(const multimap< string, string > &field)
Definition: lateq.cpp:232
void printDGroup(const string &section, list< string > &field, ostream &docout)
Print a dgroup environment to auto-break long formulas.
Definition: lateq.cpp:319
list< string > fRDTblSigsFormulas
Definition: lateq.hh:97
void printHierarchy(const string &section, multimap< string, string > &field, ostream &docout)
Print formulas for user interface signals.
Definition: lateq.cpp:359
std::string to_string(const T &t)
Definition: lateq.cpp:60
list< string > fConstSigsFormulas
Definition: lateq.hh:93
list< string > fRecurSigsFormulas
Definition: lateq.hh:96
list< string > fPrefixSigsFormulas
Definition: lateq.hh:100
list< string > fSelectSigsFormulas
Definition: lateq.hh:99
list< string > fOutputSigsFormulas
Definition: lateq.hh:101

Here is the call graph for this function:

Here is the caller graph for this function:

void Lateq::printMath ( const string &  section,
list< string > &  field,
ostream &  docout 
)
private

Print formulas for select2, select3 and prefix signals.

Parameters
[in]sectionThe title to print for these formulas.
[in]fieldThe list of LaTeX arrays (for braces with two lines).
[out]docoutThe LaTeX output file to print into.
See also
DocCompiler::generateSelect2
DocCompiler::generateSelect3
DocCompiler::generatePrefix

Definition at line 423 of file lateq.cpp.

Referenced by println().

424 {
425  if (field.size() > 0) {
426  docout << section;
427  docout << "\\begin{displaymath}" << endl;
428  list<string>::iterator s;
429  for (s = field.begin(); s != field.end(); ++s) {
430  docout << *s << endl;
431  }
432  docout << "\\end{displaymath}" << endl;
433  docout << endl;
434  }
435 }

Here is the caller graph for this function:

void Lateq::printOneLine ( const string &  section,
ostream &  docout 
)
private

Print a sorted list of input signals names ("x_i"), on a single line, separated by commas.

Parameters
[in]sectionThe title to print for these formulas.
[out]docoutThe LaTeX output file to print into.

Definition at line 302 of file lateq.cpp.

Referenced by println().

303 {
304  docout << section << endl << endl;
305 }

Here is the caller graph for this function:

void Lateq::tab ( int  n,
ostream &  docout 
) const
private

Simple handling of indentation.

Definition at line 439 of file lateq.cpp.

Referenced by printDGroup(), and printHierarchy().

440 {
441  while (n--) docout << '\t';
442 }

Here is the caller graph for this function:

Member Data Documentation

list<string> Lateq::fConstSigsFormulas
private

Definition at line 93 of file lateq.hh.

Referenced by println().

list<string> Lateq::fInputSigsFormulas
private

LaTeX formulas to print.

Definition at line 92 of file lateq.hh.

Referenced by println().

const int Lateq::fNumInputs
private

Definition at line 88 of file lateq.hh.

const int Lateq::fNumOutputs
private

Definition at line 89 of file lateq.hh.

list<string> Lateq::fOutputSigsFormulas
private

Definition at line 101 of file lateq.hh.

Referenced by println().

list<string> Lateq::fParamSigsFormulas
private

Definition at line 94 of file lateq.hh.

Referenced by println().

list<string> Lateq::fPrefixSigsFormulas
private

Definition at line 100 of file lateq.hh.

Referenced by println().

list<string> Lateq::fRDTblSigsFormulas
private

Definition at line 97 of file lateq.hh.

Referenced by println().

list<string> Lateq::fRecurSigsFormulas
private

Definition at line 96 of file lateq.hh.

Referenced by println().

list<string> Lateq::fRWTblSigsFormulas
private

Definition at line 98 of file lateq.hh.

Referenced by println().

list<string> Lateq::fSelectSigsFormulas
private

Definition at line 99 of file lateq.hh.

Referenced by println().

list<string> Lateq::fStoreSigsFormulas
private

Definition at line 95 of file lateq.hh.

Referenced by println().

multimap<string,string> Lateq::fUISigsFormulas
private

Definition at line 102 of file lateq.hh.

Referenced by println().


The documentation for this class was generated from the following files: