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

Go to the source code of this file.

Functions

bool ptimetable_tex (std::vector< PLatexObj > &vecContent, const PTimeTable &timetable, const PPath &outputDirectory, bool isSaveSpeaker)
 Convert a PTimeTable into PLatexObj. More...
 

Function Documentation

◆ ptimetable_tex()

bool ptimetable_tex ( std::vector< PLatexObj > &  vecContent,
const PTimeTable timetable,
const PPath outputDirectory,
bool  isSaveSpeaker 
)

Convert a PTimeTable into PLatexObj.

Parameters
[out]vecContent: vector of PLatexObj to be completed with PTimeTable
timetable: PTimeTable to be converted into PLatexObj
outputDirectory: output directory of merge block
isSaveSpeaker: true if the speakers have to saved in latex
Returns
true on success, false otherwise

Definition at line 478 of file ptimetable_tex.cpp.

478  {
479  //Let's convert the PTimeTable into a more precise representation
480  TexTimetable texTimetable;
481  std::cerr << "ptimetable_tex : call ptimetable_createTexTimeTable" << std::endl;
482  ptimetable_createTexTimeTable(texTimetable, timetable);
483  //Add empty block to make days coherent
484  std::cerr << "ptimetable_tex : call ptimetable_completeEmptyBlock" << std::endl;
485  ptimetable_completeEmptyBlock(texTimetable);
486  //Update the size of the blocks in the timetable
487  std::cerr << "ptimetable_tex : call ptimetable_updateTimeRow" << std::endl;
488  ptimetable_updateTimeRow(texTimetable);
489  //Let's put all block in the vecContent
490  std::cerr << "ptimetable_tex : call ptimetable_toTex" << std::endl;
491  PLatexObj timetableObj;
492  ptimetable_toTex(timetableObj, texTimetable);
493  vecContent.push_back(platexobj_createSection(PLatexType::PART, timetable.getName(), "sec_"+timetable.getInvitation()));
494  if(texTimetable.invitation != ""){
495  vecContent.push_back(platexobj_createRendezVous(PPath(LATEX_INVITATION_OUTPUT_DIR "/" + texTimetable.invitation + ".ics")));
496  }
497  vecContent.push_back(timetableObj);
498  ptimetable_texPart(vecContent, texTimetable);
499  if(isSaveSpeaker){
500  pspeaker_tex(vecContent, timetable);
501  }
502  return ptimetable_createInvitationMergBlock(outputDirectory, texTimetable);
503 // return ptimetable_createInvitation(outputDirectory, texTimetable);
504 }
#define LATEX_INVITATION_OUTPUT_DIR
Definition: PLatexObj_def.h:14
Describe a latex object.
Definition: PLatexObj.h:40
Path of a directory or a file.
Definition: PPath.h:17
const PString & getInvitation() const
Gets the invitation of the PTimeTable.
Definition: PTimeTable.cpp:859
const PLatexObj & getName() const
Gets the name of the PTimeTable.
Definition: PTimeTable.cpp:845
PLatexObj platexobj_createRendezVous(const PPath &fileNameIcs)
Create a RENDEZVOUS.
PLatexObj platexobj_createSection(PLatexType::PLatexType sectionType, const PLatexObj &complexTitle, const PString &label)
Create a part, chapter, section, subsection, subsubsection.
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.
bool ptimetable_createInvitationMergBlock(const PPath &outputDirectory, const TexTimetable &timetable)
Create invitations but merge blocks with the same invitation.
void ptimetable_texPart(std::vector< PLatexObj > &vecContent, const TexTimetable &texTimetable)
Convert a PTimeTable into PLatexObj.
void ptimetable_updateTimeRow(TexTimetable &texTimetable)
Update the time rows of the PTimeTableBlock.
void ptimetable_toTex(PLatexObj &obj, const TexTimetable &texTimetable)
Convert a TexTimetable into a PLatexObj.
void ptimetable_completeEmptyBlock(TexTimetable &texTimetable)
Complete day of timetable with empty blocks to make them coherent.
void ptimetable_createTexTimeTable(TexTimetable &texTimetable, const PTimeTable &timetable)
Create the TexTimetable.
Full latex timetable.
Definition: TexTimetable.h:38
PString invitation
Invitation of the full event.
Definition: TexTimetable.h:40

References PTimeTable::getInvitation(), PTimeTable::getName(), TexTimetable::invitation, LATEX_INVITATION_OUTPUT_DIR, PLatexType::PART, platexobj_createRendezVous(), platexobj_createSection(), pspeaker_tex(), ptimetable_completeEmptyBlock(), ptimetable_createInvitationMergBlock(), ptimetable_createTexTimeTable(), ptimetable_texPart(), ptimetable_toTex(), and ptimetable_updateTimeRow().

Referenced by PConfigParser::parseTimeTable().

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