lateq.cpp File Reference

#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <set>
#include <sstream>
#include "lateq.hh"
#include "Text.hh"
Include dependency graph for lateq.cpp:

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

Function Documentation

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().

00484 {
00485     return getLateqIndex(s1) < getLateqIndex(s2);
00486 }

Here is the call graph for this function:

Here is the caller graph for this function:

static int getLateqIndex ( const string &  s  )  [static]

Find out the index of signals in LaTeX signal definition strings, between the first "_{" and "}" patterns.

Parameters:
[in] s A LaTeX string to parse.
Returns:
<int> The index found, as an integer.

Definition at line 496 of file lateq.cpp.

Referenced by compLateqIndexes().

00497 {
00498     size_t p1;
00499     size_t p2;
00500     string sIndex;
00501         
00502     p1 = s.find("_{"); 
00503     if (p1==string::npos) {
00504         cerr << "Error : getLateqIndex found no \"{_\" substring.\n";
00505         exit(1); }
00506     p1 += 2;
00507     
00508     p2 = s.find("}", p1); 
00509     if (p2==string::npos) {
00510         cerr << "Error : getLateqIndex found no \"}\" substring\n.";
00511         exit(1); }
00512     p2 -= 3;
00513     
00514     sIndex = s.substr (p1, p2);
00515 
00516     return atoi(sIndex.c_str());
00517 }

Here is the caller graph for this function:

void initDocMath (  ) 

Dispatch initialization of autodoc container.

Definition at line 468 of file lateq.cpp.

References initDocMathKeySet().

Referenced by loadTranslationFile().

00469 {
00470     initDocMathKeySet();
00471 }

Here is the call graph for this function:

Here is the caller graph for this function:

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().

00524 {
00525     gDocMathKeySet.insert("inputsigtitle1");
00526     gDocMathKeySet.insert("inputsigtitle2");
00527     gDocMathKeySet.insert("outputsigtitle1");
00528     gDocMathKeySet.insert("outputsigtitle2");
00529     gDocMathKeySet.insert("constsigtitle1");
00530     gDocMathKeySet.insert("constsigtitle2");
00531     gDocMathKeySet.insert("uisigtitle1");
00532     gDocMathKeySet.insert("uisigtitle2");
00533     gDocMathKeySet.insert("intermedsigtitle1");
00534     gDocMathKeySet.insert("intermedsigtitle2");
00535     gDocMathKeySet.insert("lateqcomment");
00536     gDocMathKeySet.insert("emptyformulafield");
00537     gDocMathKeySet.insert("defaultvalue");
00538     gDocMathKeySet.insert("suchthat");
00539     gDocMathKeySet.insert("and");
00540     gDocMathKeySet.insert("for");
00541     gDocMathKeySet.insert("rootlevel");
00542 
00543     gDocMathKeySet.insert("dgmcaption");
00544 }

Here is the caller graph for this function:

template<class T >
std::string to_string ( const T &  t  )  [inline]

Definition at line 60 of file lateq.cpp.

Referenced by Lateq::makeSigDomain(), and Lateq::println().

00061 {
00062     std::stringstream ss;
00063     ss << t;
00064     return ss.str();
00065 }

Here is the caller graph for this function:


Variable Documentation

set<string> gDocMathKeySet

Definition at line 52 of file lateq.cpp.

Referenced by initDocMathKeySet(), and storePair().

map<string, string> gDocMathStringMap
Generated on Tue Aug 10 08:04:13 2010 for FAUST compiler by  doxygen 1.6.3