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

{
    return getLateqIndex(s1) < getLateqIndex(s2);
}

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

{
    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());
}

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

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

{
    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");
}

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

{
    std::stringstream ss;
    ss << t;
    return ss.str();
}

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