#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <set>
#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. | |
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 322 of file lateq.cpp.
References getLateqIndex().
Referenced by Lateq::println(), and Lateq::printOneLine().
00323 { 00324 return getLateqIndex(s1) < getLateqIndex(s2); 00325 }
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 335 of file lateq.cpp.
Referenced by compLateqIndexes().
00336 { 00337 size_t p1; 00338 size_t p2; 00339 string sIndex; 00340 00341 p1 = s.find("_{"); 00342 if (p1==string::npos) { 00343 cerr << "Error : getLateqIndex found no \"{_\" substring.\n"; 00344 exit(1); } 00345 p1 += 2; 00346 00347 p2 = s.find("}", p1); 00348 if (p2==string::npos) { 00349 cerr << "Error : getLateqIndex found no \"}\" substring\n."; 00350 exit(1); } 00351 p2 -= 3; 00352 00353 sIndex = s.substr (p1, p2); 00354 00355 return atoi(sIndex.c_str()); 00356 }
void initDocMath | ( | ) |
Dispatch initialization of autodoc container.
Definition at line 307 of file lateq.cpp.
References initDocMathKeySet().
Referenced by loadTranslationFile().
00308 { 00309 initDocMathKeySet(); 00310 }
static void initDocMathKeySet | ( | ) | [static] |
Initialize gDocMathKeySet, a set containing all the keywords.
Definition at line 362 of file lateq.cpp.
References gDocMathKeySet.
Referenced by initDocMath().
00363 { 00364 gDocMathKeySet.insert("inputsigtitle1"); 00365 gDocMathKeySet.insert("inputsigtitle2"); 00366 gDocMathKeySet.insert("outputsigtitle1"); 00367 gDocMathKeySet.insert("outputsigtitle2"); 00368 gDocMathKeySet.insert("constsigtitle1"); 00369 gDocMathKeySet.insert("constsigtitle2"); 00370 gDocMathKeySet.insert("uisigtitle1"); 00371 gDocMathKeySet.insert("uisigtitle2"); 00372 gDocMathKeySet.insert("paramsigtitle1"); 00373 gDocMathKeySet.insert("paramsigtitle2"); 00374 gDocMathKeySet.insert("internalsigtitle1"); 00375 gDocMathKeySet.insert("internalsigtitle2"); 00376 gDocMathKeySet.insert("lateqcomment"); 00377 gDocMathKeySet.insert("emptyformulafield"); 00378 gDocMathKeySet.insert("defaultvalue"); 00379 }
set<string> gDocMathKeySet |
Definition at line 51 of file lateq.cpp.
Referenced by initDocMathKeySet(), and storePair().
map<string, string> gDocMathStringMap |
Definition at line 50 of file lateq.cpp.
Referenced by importDocStrings(), DocCompiler::prepareBinaryUI(), DocCompiler::prepareIntervallicUI(), Lateq::println(), Lateq::printOneLine(), and storePair().