FAUST compiler  0.9.9.6b8
Functions | Variables
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. More...
 
static bool compLateqIndexes (const string &s1, const string &s2)
 Compare indexes of two LaTeX strings, for the sort() method applied on list<string> fields. More...
 
static void initDocMathKeySet ()
 Initialize gDocMathKeySet, a set containing all the keywords. More...
 
template<class T >
std::string to_string (const T &t)
 
void initDocMath ()
 Dispatch initialization of autodoc container. More...
 

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

484 {
485  return getLateqIndex(s1) < getLateqIndex(s2);
486 }
static int getLateqIndex(const string &s)
Find out the index of signals in LaTeX signal definition strings, between the first "_{" and "}" patt...
Definition: lateq.cpp:496

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]sA LaTeX string to parse.
Returns
<int> The index found, as an integer.

Definition at line 496 of file lateq.cpp.

Referenced by compLateqIndexes().

497 {
498  size_t p1;
499  size_t p2;
500  string sIndex;
501 
502  p1 = s.find("_{");
503  if (p1==string::npos) {
504  cerr << "Error : getLateqIndex found no \"{_\" substring.\n";
505  exit(1); }
506  p1 += 2;
507 
508  p2 = s.find("}", p1);
509  if (p2==string::npos) {
510  cerr << "Error : getLateqIndex found no \"}\" substring\n.";
511  exit(1); }
512  p2 -= 3;
513 
514  sIndex = s.substr (p1, p2);
515 
516  return atoi(sIndex.c_str());
517 }

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

469 {
471 }
static void initDocMathKeySet()
Initialize gDocMathKeySet, a set containing all the keywords.
Definition: lateq.cpp:523

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

524 {
525  gDocMathKeySet.insert("inputsigtitle1");
526  gDocMathKeySet.insert("inputsigtitle2");
527  gDocMathKeySet.insert("outputsigtitle1");
528  gDocMathKeySet.insert("outputsigtitle2");
529  gDocMathKeySet.insert("constsigtitle1");
530  gDocMathKeySet.insert("constsigtitle2");
531  gDocMathKeySet.insert("uisigtitle1");
532  gDocMathKeySet.insert("uisigtitle2");
533  gDocMathKeySet.insert("intermedsigtitle1");
534  gDocMathKeySet.insert("intermedsigtitle2");
535  gDocMathKeySet.insert("lateqcomment");
536  gDocMathKeySet.insert("emptyformulafield");
537  gDocMathKeySet.insert("defaultvalue");
538  gDocMathKeySet.insert("suchthat");
539  gDocMathKeySet.insert("and");
540  gDocMathKeySet.insert("for");
541  gDocMathKeySet.insert("rootlevel");
542 
543  gDocMathKeySet.insert("dgmcaption");
544 }
set< string > gDocMathKeySet
Definition: lateq.cpp:52

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

61 {
62  std::stringstream ss;
63  ss << t;
64  return ss.str();
65 }

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