PhoenixLecture  2.0.0
Set of tools to make lectures
updateParent.cpp File Reference
#include "updateParent.h"
+ Include dependency graph for updateParent.cpp:

Go to the source code of this file.

Functions

void updateParent (POutoutMode &outputMode, PLatexObj &obj)
 Update the parent of the sections. More...
 
void updateParent (POutoutMode &outputMode, PLatexObj &obj, const PLatexMenu &parentMenu)
 Update the parent of the sections. More...
 

Function Documentation

◆ updateParent() [1/2]

void updateParent ( POutoutMode outputMode,
PLatexObj obj 
)

Update the parent of the sections.

Parameters
[out]outputMode: output mode of the html backend
[out]obj: PLatexObj to be udpated

Definition at line 37 of file updateParent.cpp.

37  {
38  PLatexMenu menu;
39  menu.setLink(obj.getLink());
40  menu.setText("Main Page");
41  PVecLatexObj & vecObj = obj.getVecContent();
42  for(PVecLatexObj::iterator it(vecObj.begin()); it != vecObj.end(); ++it){
43  if(isSection(*it)){
44  updateParent(outputMode, *it, menu);
45  }
46  }
47 }
Describe a menu entry.
Definition: PLatexObj.h:17
void setText(const PString &text)
Sets the text of the PLatexMenu.
Definition: PLatexObj.cpp:48
void setLink(const PString &link)
Sets the link of the PLatexMenu.
Definition: PLatexObj.cpp:41
const std::vector< PLatexObj > & getVecContent() const
Gets the vecContent of the PLatexObj.
Definition: PLatexObj.cpp:410
const PString & getLink() const
Gets the link of the PLatexObj.
Definition: PLatexObj.cpp:368
bool isSection(const PLatexObj &obj)
Say if the PLatexObj is a part, charpter, section, subsection or subsubsection.
std::vector< PLatexObj > PVecLatexObj
Vector of obj.
void updateParent(POutoutMode &outputMode, PLatexObj &obj, const PLatexMenu &parentMenu)
Update the parent of the sections.

References PLatexObj::getLink(), PLatexObj::getVecContent(), isSection(), PLatexMenu::setLink(), PLatexMenu::setText(), and updateParent().

+ Here is the call graph for this function:

◆ updateParent() [2/2]

void updateParent ( POutoutMode outputMode,
PLatexObj obj,
const PLatexMenu parentMenu 
)

Update the parent of the sections.

Parameters
[out]outputMode: output mode of the html backend
[out]obj: PLatexObj to be udpated
parentMenu: reference, link and title of the parent section

Definition at line 16 of file updateParent.cpp.

16  {
17  if(!isSection(obj)){return;}
18  obj.setParentSec(parentMenu);
19 
20  PLatexMenu menu;
21  menu.setLink(obj.getLink());
22 // menu.setText(obj.getName());
23  menu.setText(getSectionTitle(outputMode, obj));
24 
25  PVecLatexObj & vecObj = obj.getVecContent();
26  for(PVecLatexObj::iterator it(vecObj.begin()); it != vecObj.end(); ++it){
27  if(isSection(*it)){
28  updateParent(outputMode, *it, menu);
29  }
30  }
31 }
void setParentSec(const PLatexMenu &parentSec)
Sets the parentSec of the PLatexObj.
Definition: PLatexObj.cpp:228
PString getSectionTitle(POutoutMode &outputMode, const PLatexObj &obj)
Get the title of a part/chapter/section etc.

References PLatexObj::getLink(), getSectionTitle(), PLatexObj::getVecContent(), isSection(), PLatexMenu::setLink(), PLatexObj::setParentSec(), and PLatexMenu::setText().

Referenced by processAllFile(), and updateParent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: