PhoenixLecture  2.0.0
Set of tools to make lectures
PConfigParser.h
Go to the documentation of this file.
1 /***************************************
2  Auteur : Pierre Aubert
3  Mail : pierre.aubert@lapp.in2p3.fr
4  Licence : CeCILL-C
5 ****************************************/
6 
7 #ifndef __PCONFIGPARSER_H__
8 #define __PCONFIGPARSER_H__
9 
10 #include "PGenericParser.h"
11 
14  public:
15  PConfigParser(const PString & installPrefix = "");
16  PConfigParser(const PConfigParser & other);
17  virtual ~PConfigParser();
18  PConfigParser & operator = (const PConfigParser & other);
19 
20  protected:
21  void copyPConfigParser(const PConfigParser & other);
22 
23  virtual bool parseFile();
24  virtual void preLoadFile();
25  virtual void postLoadFile();
26 
27  private:
28  void initialisationPConfigParser(const PString & baseInstallPrefix);
29  bool loadInclude(PLatexObj & parent, PLatexObj & textObj, const PPath & fileName);
30 
31  bool parseComplexMonoParam(PLatexObj & parent, PLatexObj & textObj, const PString & functionName, PLatexType::PLatexType type);
32 
33  bool parseAllLatexObj(PLatexObj & parent, PLatexObj & textObj);
34 
35  bool parseBookMainPageLink(PLatexObj & parent, PLatexObj & textObj);
36 
37  bool parseSpaceParagraphe(PLatexObj & parent, PLatexObj & textObj);
38  bool parseNewLine(PLatexObj & parent, PLatexObj & textObj);
39  bool parseRealNewLine(PLatexObj & parent, PLatexObj & textObj);
40 
41  bool parseDots(PLatexObj & parent, PLatexObj & textObj);
42  bool parseIncludeFile(PLatexObj & parent, PLatexObj & textObj);
43  bool parseInputFile(PLatexObj & parent, PLatexObj & textObj);
44  bool parseVideo(PLatexObj & parent, PLatexObj & textObj);
45  bool parserDetails(PLatexObj & parent, PLatexObj & textObj);
46  bool parserQuote(PLatexObj & parent, PLatexObj & textObj);
47 
48  bool parserCallDot(PLatexObj & parent, PLatexObj & textObj);
49  bool parserSvgToPng(PLatexObj & parent, PLatexObj & textObj);
50 
51  bool parseComment(PLatexObj & parent, PLatexObj & textObj);
52  bool parseDebug(PLatexObj & parent, PLatexObj & textObj);
53  bool parseHref(PLatexObj & parent, PLatexObj & textObj);
54  bool parsePercent(PLatexObj & parent, PLatexObj & textObj);
55 
56  bool parseSectionTitle(PLatexObj & parent, PLatexObj & textObj, const PString & functionName, PLatexType::PLatexType type);
57  void parseVecLatexObj(PLatexObj & parent, PLatexObj & textObj, const PString & beginPatern, const PString & endPatern);
58  bool parseIncludeGraphic(PLatexObj & parent, PLatexObj & textObj);
59  bool parseAddSpeaker(PLatexObj & parent, PLatexObj & textObj);
60  bool parseSaveSpeaker(PLatexObj & parent, PLatexObj & textObj);
61 
62  bool parseTimeTable(PLatexObj & parent, PLatexObj & textObj);
63  bool parseEnvironement(PLatexObj & parent, PLatexObj & textObj, const PString & environementName, PLatexType::PLatexType type);
64  bool parseEnvironementContent(PLatexObj & parent, PLatexObj & textObj, const PString & environementName, PLatexType::PLatexType type, bool isAllowComment, bool isAllowMath, const PString & envBalise);
65 
66  bool parseTabular(PLatexObj & parent, PLatexObj & textObj);
67 
68  bool parseEnvStringOnly(PLatexObj & parent, PLatexObj & textObj, const PString & environementName, PLatexType::PLatexType type);
69  bool parseInlineMath(PLatexObj & parent, PLatexObj & textObj);
70  bool parseDoubleInlineMath(PLatexObj & parent, PLatexObj & textObj);
71 
72  bool parseStringAndGoBack(const PString & str);
73  bool parseItem(PLatexObj & parent, PLatexObj & textObj);
74 
75  bool parseParserLanguage(PLatexObj & parent, PLatexObj & textObj);
76  bool parseParserLanguageFunction(PLatexObj & parent, PLatexObj & textObj);
77  bool parseExtraEnvironement(PLatexObj & parent, PLatexObj & textObj);
78  bool parseExtraEnvironementContent(PLatexObj & parent, PLatexObj & textObj, const PString & environementName, PLatexType::PLatexType type);
79  bool parseExtraEnvironementFunction(PLatexObj & parent, PLatexObj & textObj);
80  bool parseExtraFunction(PLatexObj & parent, PLatexObj & textObj);
81 
82  bool skipMonoParam(const PString & functionName);
83 
88 };
89 
90 #endif
91 
Parse the pdata confguration file.
Definition: PConfigParser.h:13
bool parseIncludeFile(PLatexObj &parent, PLatexObj &textObj)
Parse a file inclusion.
bool parseSpaceParagraphe(PLatexObj &parent, PLatexObj &textObj)
Parse a space paragraphe.
virtual void postLoadFile()
Initialisation to be done just after loading a file.
bool parsePercent(PLatexObj &parent, PLatexObj &textObj)
Parse latex percent.
bool loadInclude(PLatexObj &parent, PLatexObj &textObj, const PPath &fileName)
Load a included file.
bool parseParserLanguageFunction(PLatexObj &parent, PLatexObj &textObj)
Parse a language parser with a function which get an input file.
bool parseExtraEnvironementContent(PLatexObj &parent, PLatexObj &textObj, const PString &environementName, PLatexType::PLatexType type)
Parse latex environement.
bool parseVideo(PLatexObj &parent, PLatexObj &textObj)
Parse a file inclusion.
bool parseComplexMonoParam(PLatexObj &parent, PLatexObj &textObj, const PString &functionName, PLatexType::PLatexType type)
Parse all the functions which have complex mono parameter in braces {...}.
bool parseHref(PLatexObj &parent, PLatexObj &textObj)
Parse latex Href.
bool parseStringAndGoBack(const PString &str)
Parse a string an go back if the string exists.
bool parserDetails(PLatexObj &parent, PLatexObj &textObj)
Parse a detail environement.
PConfigParser(const PString &installPrefix="")
Default constructeur of PConfigParser.
bool parseExtraEnvironementFunction(PLatexObj &parent, PLatexObj &textObj)
Parse extra environement (terminal, cplusplus, cmake, conseil, attention, ...)
bool parseInlineMath(PLatexObj &parent, PLatexObj &textObj)
Parse an inline math formula.
bool parseDots(PLatexObj &parent, PLatexObj &textObj)
Parse a space paragraphe.
bool parseTimeTable(PLatexObj &parent, PLatexObj &textObj)
Parse the timetable command.
bool parserCallDot(PLatexObj &parent, PLatexObj &textObj)
Parse a call to dot.
bool p_isAllowComment
True to allow comments.
Definition: PConfigParser.h:85
bool p_isAllowMath
True to allow math.
Definition: PConfigParser.h:87
PConfigParser & operator=(const PConfigParser &other)
Definition of equal operator of PConfigParser.
virtual ~PConfigParser()
Destructeur of PConfigParser.
bool parserSvgToPng(PLatexObj &parent, PLatexObj &textObj)
Parse a svg to png function.
bool parseNewLine(PLatexObj &parent, PLatexObj &textObj)
Parse a new line.
bool parseEnvironement(PLatexObj &parent, PLatexObj &textObj, const PString &environementName, PLatexType::PLatexType type)
Parse latex environement.
bool parseDoubleInlineMath(PLatexObj &parent, PLatexObj &textObj)
Parse an inline math formula.
bool parserQuote(PLatexObj &parent, PLatexObj &textObj)
Parse a quote environnement.
bool parseComment(PLatexObj &parent, PLatexObj &textObj)
Parse a comment.
bool parseAllLatexObj(PLatexObj &parent, PLatexObj &textObj)
Parse all the latex obj.
bool parseInputFile(PLatexObj &parent, PLatexObj &textObj)
Parse a file inclusion.
bool parseEnvStringOnly(PLatexObj &parent, PLatexObj &textObj, const PString &environementName, PLatexType::PLatexType type)
Parse an environement which contains only a string.
virtual bool parseFile()
Parse the input file.
bool parseDebug(PLatexObj &parent, PLatexObj &textObj)
Parse the debug function.
bool parseRealNewLine(PLatexObj &parent, PLatexObj &textObj)
Parse a new line.
bool parseSectionTitle(PLatexObj &parent, PLatexObj &textObj, const PString &functionName, PLatexType::PLatexType type)
Parse all the functions which have complex mono parameter in braces {...}.
void copyPConfigParser(const PConfigParser &other)
Copy function of PConfigParser.
bool parseSaveSpeaker(PLatexObj &parent, PLatexObj &textObj)
Parse the savespeakers command.
bool parseTabular(PLatexObj &parent, PLatexObj &textObj)
Parse a tabular environement.
bool parseIncludeGraphic(PLatexObj &parent, PLatexObj &textObj)
Parse the includegraphic command.
bool parseParserLanguage(PLatexObj &parent, PLatexObj &textObj)
Parse language parser (cplusplus, cmake, glsl, cuda, ...)
void initialisationPConfigParser(const PString &baseInstallPrefix)
Initialisation function of the class PConfigParser.
bool parseAddSpeaker(PLatexObj &parent, PLatexObj &textObj)
Parse the addspeakers command.
bool parseBookMainPageLink(PLatexObj &parent, PLatexObj &textObj)
Parse the book main page link.
bool parseEnvironementContent(PLatexObj &parent, PLatexObj &textObj, const PString &environementName, PLatexType::PLatexType type, bool isAllowComment, bool isAllowMath, const PString &envBalise)
Parse latex environement.
bool skipMonoParam(const PString &functionName)
Skip a mon parameter.
bool parseExtraEnvironement(PLatexObj &parent, PLatexObj &textObj)
Parse extra environement (terminal, cplusplus, cmake, conseil, attention, ...)
virtual void preLoadFile()
Initialisation to be done just before loading a file.
bool parseExtraFunction(PLatexObj &parent, PLatexObj &textObj)
Parse extra environement (terminal, cplusplus, cmake, conseil, attention, ...)
void parseVecLatexObj(PLatexObj &parent, PLatexObj &textObj, const PString &beginPatern, const PString &endPatern)
Parse a vector of latex object.
bool parseItem(PLatexObj &parent, PLatexObj &textObj)
Parse an item.
Generic parser.
Describe a latex object.
Definition: PLatexObj.h:40
Path of a directory or a file.
Definition: PPath.h:17
Extends the std::string.
Definition: PString.h:16
PLatexType
Type of the PLatexObj.
Definition: PLatexType.h:12