PhoenixLecture  2.0.0
Set of tools to make lectures
PGenericParser.h File Reference
+ Include dependency graph for PGenericParser.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PGenericParser
 Generic parser. More...
 

Macros

#define COPIED_RECOVER_FILE   ".copied_file_recover.map"
 Define the name of the file which contains the formulae and the path to the created file. More...
 
#define PARSER_SKIP_SPACE   p_parser->skipChars(" \t\n");
 Macro to skip space. More...
 

Typedefs

typedef std::map< PString, time_t > PMapFile
 Map of the copied files. More...
 

Functions

std::vector< PStringgetBeginSeqEnv (const PString &envName)
 Get the sequence of the begining of an environement. More...
 
std::vector< PStringgetEndSeqEnv (const PString &envName)
 Get the sequence of the ending of an environement. More...
 
bool wgetFile (const PString &url)
 Do a wget of a file. More...
 

Macro Definition Documentation

◆ COPIED_RECOVER_FILE

#define COPIED_RECOVER_FILE   ".copied_file_recover.map"

Define the name of the file which contains the formulae and the path to the created file.

Definition at line 22 of file PGenericParser.h.

◆ PARSER_SKIP_SPACE

#define PARSER_SKIP_SPACE   p_parser->skipChars(" \t\n");

Macro to skip space.

Definition at line 24 of file PGenericParser.h.

Typedef Documentation

◆ PMapFile

typedef std::map<PString, time_t> PMapFile

Map of the copied files.

Definition at line 27 of file PGenericParser.h.

Function Documentation

◆ getBeginSeqEnv()

std::vector<PString> getBeginSeqEnv ( const PString envName)

Get the sequence of the begining of an environement.

Parameters
envName: name of the environement
Returns
corresponding sequence

Definition at line 27 of file PGenericParser.cpp.

27  {
28  PVecString vecEndPatern;
29  vecEndPatern.push_back("\\begin");
30  vecEndPatern.push_back("{");
31  vecEndPatern.push_back(envName);
32  vecEndPatern.push_back("}");
33  return vecEndPatern;
34 }
std::vector< PString > PVecString
Definition: PString.h:96

Referenced by PConfigParser::parseEnvironement(), PConfigParser::parserDetails(), PConfigParser::parserQuote(), and PConfigParser::parseTabular().

+ Here is the caller graph for this function:

◆ getEndSeqEnv()

std::vector<PString> getEndSeqEnv ( const PString envName)

Get the sequence of the ending of an environement.

Parameters
envName: name of the environement
Returns
corresponding sequence

Definition at line 40 of file PGenericParser.cpp.

40  {
41  PVecString vecEndPatern;
42  vecEndPatern.push_back("\\end");
43  vecEndPatern.push_back("{");
44  vecEndPatern.push_back(envName);
45  vecEndPatern.push_back("}");
46  return vecEndPatern;
47 }

Referenced by PConfigParser::parseEnvironementContent(), PConfigParser::parserDetails(), PConfigParser::parserQuote(), and PConfigParser::parseTabular().

+ Here is the caller graph for this function:

◆ wgetFile()

bool wgetFile ( const PString url)

Do a wget of a file.

Parameters
url: url to be used
Returns
true on success, false otherwise

Definition at line 18 of file PGenericParser.cpp.

18  {
19  PString command("wget \""+url+"\"");
20  return system(command.c_str()) != 0;
21 }
Extends the std::string.
Definition: PString.h:16

Referenced by PConfigParser::loadInclude().

+ Here is the caller graph for this function: