|
FAUST compiler
0.9.9.6b8
|
#include <stdio.h>#include <iostream>#include <cstdlib>#include <set>#include <sstream>#include "lateq.hh"#include "Text.hh"
Go to the source code of this file.
Functions | |
| static int | getLateqIndex (const string &s) |
| Find out the index of signals in LaTeX signal definition strings, between the first "_{" and "}" patterns. | |
| static bool | compLateqIndexes (const string &s1, const string &s2) |
| Compare indexes of two LaTeX strings, for the sort() method applied on list<string> fields. | |
| static void | initDocMathKeySet () |
| Initialize gDocMathKeySet, a set containing all the keywords. | |
| template<class T > | |
| std::string | to_string (const T &t) |
| void | initDocMath () |
| Dispatch initialization of autodoc container. | |
Variables | |
| map< string, string > | gDocMathStringMap |
| set< string > | gDocMathKeySet |
| static bool compLateqIndexes | ( | const string & | s1, |
| const string & | s2 | ||
| ) | [static] |
Compare indexes of two LaTeX strings, for the sort() method applied on list<string> fields.
Definition at line 483 of file lateq.cpp.
References getLateqIndex().
Referenced by Lateq::println().
{
return getLateqIndex(s1) < getLateqIndex(s2);
}


| static int getLateqIndex | ( | const string & | s | ) | [static] |
Find out the index of signals in LaTeX signal definition strings, between the first "_{" and "}" patterns.
| [in] | s | A LaTeX string to parse. |
Definition at line 496 of file lateq.cpp.
Referenced by compLateqIndexes().
{
size_t p1;
size_t p2;
string sIndex;
p1 = s.find("_{");
if (p1==string::npos) {
cerr << "Error : getLateqIndex found no \"{_\" substring.\n";
exit(1); }
p1 += 2;
p2 = s.find("}", p1);
if (p2==string::npos) {
cerr << "Error : getLateqIndex found no \"}\" substring\n.";
exit(1); }
p2 -= 3;
sIndex = s.substr (p1, p2);
return atoi(sIndex.c_str());
}

| void initDocMath | ( | ) |
Dispatch initialization of autodoc container.
Definition at line 468 of file lateq.cpp.
References initDocMathKeySet().
Referenced by loadTranslationFile().
{
initDocMathKeySet();
}


| static void initDocMathKeySet | ( | ) | [static] |
Initialize gDocMathKeySet, a set containing all the keywords.
Definition at line 523 of file lateq.cpp.
References gDocMathKeySet.
Referenced by initDocMath().
{
gDocMathKeySet.insert("inputsigtitle1");
gDocMathKeySet.insert("inputsigtitle2");
gDocMathKeySet.insert("outputsigtitle1");
gDocMathKeySet.insert("outputsigtitle2");
gDocMathKeySet.insert("constsigtitle1");
gDocMathKeySet.insert("constsigtitle2");
gDocMathKeySet.insert("uisigtitle1");
gDocMathKeySet.insert("uisigtitle2");
gDocMathKeySet.insert("intermedsigtitle1");
gDocMathKeySet.insert("intermedsigtitle2");
gDocMathKeySet.insert("lateqcomment");
gDocMathKeySet.insert("emptyformulafield");
gDocMathKeySet.insert("defaultvalue");
gDocMathKeySet.insert("suchthat");
gDocMathKeySet.insert("and");
gDocMathKeySet.insert("for");
gDocMathKeySet.insert("rootlevel");
gDocMathKeySet.insert("dgmcaption");
}

Definition at line 60 of file lateq.cpp.
Referenced by Lateq::makeSigDomain(), and Lateq::println().
{
std::stringstream ss;
ss << t;
return ss.str();
}

| set<string> gDocMathKeySet |
Definition at line 52 of file lateq.cpp.
Referenced by initDocMathKeySet(), and storePair().
| map<string, string> gDocMathStringMap |
Definition at line 51 of file lateq.cpp.
Referenced by importDocStrings(), Lateq::makeItemTitle(), Lateq::makeSigDomain(), Lateq::makeSignamesList(), DocCompiler::prepareBinaryUI(), DocCompiler::prepareIntervallicUI(), printDocDgm(), Lateq::printHierarchy(), Lateq::println(), and storePair().
1.8.0