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

Go to the source code of this file.

Functions

void pspeaker_tex (std::vector< PLatexObj > &vecContent, const PTimeTable &timetable)
 Save all speakers of the given PTimeTable into a vector of PLatexObj. More...
 
void pspeaker_tex (std::vector< PLatexObj > &vecContent, const std::vector< PLatexSpeaker > &vecSpeaker, const PString &sectionLabel)
 Save all speakers of the given PTimeTable into a vector of PLatexObj. More...
 
void pspeaker_texSpeaker (std::vector< PLatexObj > &vecContent, const PLatexSpeaker &speaker)
 Save all speakers of the given PLatexSpeaker into a vector of PLatexObj. More...
 

Function Documentation

◆ pspeaker_tex() [1/2]

void pspeaker_tex ( std::vector< PLatexObj > &  vecContent,
const PTimeTable timetable 
)

Save all speakers of the given PTimeTable into a vector of PLatexObj.

Parameters
[out]vecContent: vector of PLatexObj to be completed
timetable: PTimeTable to be used

Definition at line 66 of file pspeaker_tex.cpp.

66  {
67  const std::vector<PLatexSpeaker> & vecSpeaker = timetable.getVecSpeaker();
68  pspeaker_tex(vecContent, vecSpeaker, "sec_speaker_"+timetable.getInvitation());
69 }
const PString & getInvitation() const
Gets the invitation of the PTimeTable.
Definition: PTimeTable.cpp:859
const std::vector< PLatexSpeaker > & getVecSpeaker() const
Gets the vecSpeaker of the PTimeTable.
Definition: PTimeTable.cpp:943
void pspeaker_tex(std::vector< PLatexObj > &vecContent, const std::vector< PLatexSpeaker > &vecSpeaker, const PString &sectionLabel)
Save all speakers of the given PTimeTable into a vector of PLatexObj.

References PTimeTable::getInvitation(), PTimeTable::getVecSpeaker(), and pspeaker_tex().

+ Here is the call graph for this function:

◆ pspeaker_tex() [2/2]

void pspeaker_tex ( std::vector< PLatexObj > &  vecContent,
const std::vector< PLatexSpeaker > &  vecSpeaker,
const PString sectionLabel 
)

Save all speakers of the given PTimeTable into a vector of PLatexObj.

Parameters
[out]vecContent: vector of PLatexObj to be completed
vecSpeaker: vector of PLatexSpeaker to be saved
sectionLabel: label of the created Chapter section

Definition at line 53 of file pspeaker_tex.cpp.

53  {
54  if(vecSpeaker.size() == 0lu){return;} //If there is not speakers we do not create chapter for that
55  vecContent.push_back(platexobj_createSection(PLatexType::CHAPTER, platexobj_parseStr("Speakers"), sectionLabel));
56  vecContent.push_back(platexobj_createText("Here you can find all speakers of the timetable.", ""));
57  for(std::vector<PLatexSpeaker>::const_iterator it(vecSpeaker.begin()); it != vecSpeaker.end(); ++it){
58  pspeaker_texSpeaker(vecContent, *it);
59  }
60 }
PLatexObj platexobj_createText(const PString &text, const PString &label)
Create a TEXT.
PLatexObj platexobj_createSection(PLatexType::PLatexType sectionType, const PLatexObj &complexTitle, const PString &label)
Create a part, chapter, section, subsection, subsubsection.
bool platexobj_parseStr(PLatexObj &obj, const PString &latexStr)
Parse a str and convert it into a PLatexObj.
void pspeaker_texSpeaker(std::vector< PLatexObj > &vecContent, const PLatexSpeaker &speaker)
Save all speakers of the given PLatexSpeaker into a vector of PLatexObj.

References PLatexType::CHAPTER, platexobj_createSection(), platexobj_createText(), platexobj_parseStr(), and pspeaker_texSpeaker().

Referenced by PConfigParser::parseSaveSpeaker(), pspeaker_tex(), and ptimetable_tex().

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

◆ pspeaker_texSpeaker()

void pspeaker_texSpeaker ( std::vector< PLatexObj > &  vecContent,
const PLatexSpeaker speaker 
)

Save all speakers of the given PLatexSpeaker into a vector of PLatexObj.

Parameters
[out]vecContent: vector of PLatexObj to be completed
speaker: PLatexSpeaker to be used

Definition at line 17 of file pspeaker_tex.cpp.

17  {
18  vecContent.push_back(platexobj_createSection(PLatexType::SECTION, speaker.getName(), "speaker_"+speaker.getLabel()));
19  vecContent.push_back(platexobj_createTextBf("Speaker : ", ""));
20  if(speaker.getTitle().getVecContent().size() != 0lu){
21  appendVecContent(vecContent, speaker.getTitle().getVecContent());
22  vecContent.push_back(platexobj_createText(" ", ""));
23  }
24  appendVecContent(vecContent, speaker.getName().getVecContent());
25  if(speaker.getAffiliation().getVecContent().size() != 0lu){
26  vecContent.push_back(platexobj_createNewLine());
27  vecContent.push_back(platexobj_createTextBf("Affiliation : ", ""));
28  vecContent.push_back(platexobj_createText(" (", ""));
29  appendVecContent(vecContent, speaker.getAffiliation().getVecContent());
30  vecContent.push_back(platexobj_createText(") ", ""));
31  }
32  if(speaker.getJob().getVecContent().size() != 0lu){
33  vecContent.push_back(platexobj_createNewLine());
34  vecContent.push_back(platexobj_createTextBf("Function : ", ""));
35  appendVecContent(vecContent, speaker.getJob().getVecContent());
36  }
37  if(speaker.getDescription().getVecContent().size() != 0lu){
38  vecContent.push_back(platexobj_createNewLine());
40  bio.getVecContent().push_back(platexobj_createTextBf("Bio : ", ""));
41  bio.getVecContent().push_back(platexobj_createNewLine());
42  appendVecContent(bio.getVecContent(), speaker.getDescription().getVecContent());
43  vecContent.push_back(bio);
44  }
45 }
Describe a latex object.
Definition: PLatexObj.h:40
const std::vector< PLatexObj > & getVecContent() const
Gets the vecContent of the PLatexObj.
Definition: PLatexObj.cpp:410
const PLatexObj & getTitle() const
Gets the title of the PLatexSpeaker.
Definition: PTimeTable.cpp:97
const PLatexObj & getName() const
Gets the name of the PLatexSpeaker.
Definition: PTimeTable.cpp:83
const PString & getLabel() const
Gets the label of the PLatexSpeaker.
Definition: PTimeTable.cpp:111
const PLatexObj & getAffiliation() const
Gets the affiliation of the PLatexSpeaker.
Definition: PTimeTable.cpp:139
const PLatexObj & getDescription() const
Gets the description of the PLatexSpeaker.
Definition: PTimeTable.cpp:153
const PLatexObj & getJob() const
Gets the job of the PLatexSpeaker.
Definition: PTimeTable.cpp:125
PLatexObj platexobj_createNewLine()
Create a new line.
PLatexObj platexobj_createParagraph(const PString &text, const PString &label)
Create a PARAGRAPH.
PLatexObj platexobj_createTextBf(const PString &text, const PString &label)
Create a TEXT.
void appendVecContent(std::vector< PLatexObj > &vecContent, const std::vector< PLatexObj > &vecObj)
Append a vector of PLatexObj in the given vector of content.

References appendVecContent(), PLatexSpeaker::getAffiliation(), PLatexSpeaker::getDescription(), PLatexSpeaker::getJob(), PLatexSpeaker::getLabel(), PLatexSpeaker::getName(), PLatexSpeaker::getTitle(), PLatexObj::getVecContent(), platexobj_createNewLine(), platexobj_createParagraph(), platexobj_createSection(), platexobj_createText(), platexobj_createTextBf(), and PLatexType::SECTION.

Referenced by pspeaker_tex().

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