7 #ifndef __PGENERICPARSER_H__
8 #define __PGENERICPARSER_H__
22 #define COPIED_RECOVER_FILE ".copied_file_recover.map"
24 #define PARSER_SKIP_SPACE p_parser->skipChars(" \t\n");
std::vector< PString > getEndSeqEnv(const PString &envName)
Get the sequence of the ending of an environement.
std::vector< PString > getBeginSeqEnv(const PString &envName)
Get the sequence of the begining of an environement.
bool wgetFile(const PString &url)
Do a wget of a file.
std::map< PString, time_t > PMapFile
Map of the copied files.
PGenericParser & operator=(const PGenericParser &other)
Definition of equal operator of PGenericParser.
void loadDirExtraParser(const PPath &inputDir)
Load the extra parsers.
bool parserGetEnv(PLatexObj &parent, PLatexObj &textObj)
Parse a getenv function.
bool parseBookMail(PLatexObj &parent, PLatexObj &textObj)
Parse the mail in book mode.
PLatexObj p_bookMainPageLink
Main page definition of the full site.
std::vector< PString > p_vecNameExtraParser
Vector of the name of the extra environement.
PMapExtraEnv p_vecExtraEnv
Vector of extra environements.
PLatexObj p_currentSource
Current completed source.
bool parseBookSizeBarWidth(PLatexObj &parent, PLatexObj &textObj)
Parse the width of the book sidebar.
void copyPGenericParser(const PGenericParser &other)
Copy function of PGenericParser.
void incrementCurrentChar(PLatexObj &textObj)
Increment current char position.
const PString & getBookSideBarWidth() const
Get the width of the book sidebar.
const PMapBiblioEntry & getMapBiblioEntry() const
Get the map of all bibliography entries.
void loadDirExtraEnvironementFile(const PPath &inputFile)
Load the extra environements with input file.
bool parseBookGitlabUrl(PLatexObj &parent, PLatexObj &textObj)
Parse the gitlab url in book mode.
const PLatexObj & getSource() const
Get the current source.
std::vector< PLatexSpeaker > p_vecSpeaker
Vector of all Speakers in the project.
std::map< PString, PString > p_cssContent
Css of all the configurations.
PMapExtraEnv p_vecExtraFunction
Vector of extra function.
PPath copyFile(const PPath &outputDir, const PPath &fileName)
Copy a file.
bool saveCss()
Save the css file.
const std::vector< PString > & getVecIncludeDir() const
Get the vector of include directories.
void loadDirExtraFunction(const PPath &inputDir)
Load the extra functions.
std::vector< PString > p_vecNameFunctionExtraParser
Vector of the function name of the extra environement.
void setDebugMode(bool isDebugMode)
Set if the PGenericParser is in debug mode.
bool parseMainDate(PLatexObj &parent, PLatexObj &textObj)
Parse the main date of the site.
PPath getAbsoluteFileName(const PPath &fileName)
Get the absolute path of a file.
const PLatexObj & getBookMainPageLink() const
Get the book main page link.
PLatexObj p_currentText
Current text.
bool parseMainSubTitle(PLatexObj &parent, PLatexObj &textObj)
Parse the main title of the site.
bool playTextLatexObj(PLatexObj &parent, PLatexObj &textObj, bool isRemoveFirstLastSpace=false)
Play the text latex obj.
PString p_bookMasterProjectUrl
Master project url in book mode.
void clearLatexObj(PLatexObj &obj)
Clear a latex obj.
void loadCss(const PPath &inputDir)
Load the css.
const PString & getBookGitlabUrl() const
Get the book gitlab url.
bool parseMainAuthor(PLatexObj &parent, PLatexObj &textObj)
Parse the main author of the site.
PMapBiblioEntry p_mapBiblioEntry
Map of all bibliography entries.
std::vector< PString > p_vecIncludeDir
Vector of the include directories.
bool parseBookEnableFeedback(PLatexObj &parent, PLatexObj &textObj)
Parse the book enable feedback mode.
bool parseMainTitle(PLatexObj &parent, PLatexObj &textObj)
Parse the main title of the site.
PVecLatexEnv p_vecEnv
Vector of all the environements.
PString executeLatexCommand(const PString &inputStr)
Execute the given latex command.
void loadMapFile()
Load the map of copied files.
PString p_bookSideBarWidth
Witdh of the book side bar.
std::vector< PString > p_vecNameExtraFunction
Vector of the name of the extra function.
PGenericParser(const PString &installPrefix="")
Default constructor of PGenericParser.
std::vector< PString > p_vecNameExtraEnv
Vector of the name of the extra environement.
bool p_isEnableBookFeedback
True to enable feedback in book mode.
void addLatexObj(PLatexObj &parent, const PLatexObj &obj)
Add latex obj in parent.
std::vector< PString > p_vecNameMarkdownExtraParser
Vector of the markdown name of the extra environement.
bool parseBookMasterProject(PLatexObj &parent, PLatexObj &textObj)
Parse the master project in book mode.
virtual ~PGenericParser()
Destructor of PGenericParser.
bool parseMonoParam(PLatexObj &parent, PLatexObj &textObj, const PString &functionName, PLatexType::PLatexType type)
Parse all the functions which have mono parameter in braces {...}.
void initialisationPGenericParser(const PString &baseInstallPrefix)
Initialisation function of the class PGenericParser.
PString p_bookGitlabUrl
Gitlab url of the current sources of the project.
bool getBookEnableFeedback() const
Say if the book feedback if enable or not.
const PString & getBookMail() const
Get the book mail list.
const PString & getBookMasterProjectUrl() const
Get the book master project url.
bool parseLabel(PLatexObj &parent, PLatexObj &textObj)
Parse latex label.
void loadDirExtraEnvironement(const PPath &inputDir)
Load the extra environements.
std::vector< PString > p_vecNameFunctionExtraEnv
Vector of the name of the extra environement.
void saveMapFile()
Save the map of copied files.
PVecLatexFunc p_vecFunc
Vector of all the functions.
void loadDirExtraFunctionFile(const PPath &inputFile)
Load the extra functions with input file.
PString getOptionStringBetweenHook()
Get optional string between hooks [...].
PMapFile p_mapCopiedFile
Map of copied files.
void loadDirExtraParserFile(const PPath &inputFile)
Load the extra environements with input file.
PString getOptionStringBetweenBraces()
Get optional string between braces {...}.
std::vector< PString > p_vecNameMarkdownExtraEnv
Vector of the name of the extra environement (for markdown)
PString p_bookMail
Mail to be used to contact authors in book mode.
bool parseGenericLatexObj(PLatexObj &parent, PLatexObj &textObj)
Parse the generic latex function which have to be used in the latex parser and the markdown parser to...
bool p_isDebugMode
True if be parse in debug mode.
PString getStringBetweenBraces(const PString &previousToken)
Get the string between the braces {...}.
std::vector< PString > p_vecRemoveLatexKeyword
Vector of removed latex functions.
PVecParserEnv p_vecExtraParser
Vector of extra parser.
Class used to parse file with possibility of inclusion.
Path of a directory or a file.
Vector of the environements.
PLatexType
Type of the PLatexObj.
std::map< PString, PBiblioEntry > PMapBiblioEntry
Describes the map for all PBiblioEntry.
std::vector< PLatexFunc > PVecLatexFunc
Vector of functions.
std::vector< PLatexEnv > PVecLatexEnv
Vector of env.
std::map< PString, PEnvironement > PMapExtraEnv
Vector of extra environement.