![]() |
PhoenixLecture
2.0.0
Set of tools to make lectures
|
#include <iomanip>
#include "platexobj_create.h"
#include "ptimetable_invitation.h"
#include "ptimetable_tex.h"
Go to the source code of this file.
Functions | |
void | ptimetable_addBlockInWeek (TexWeek &week, const PTimeTableBlock &block, const PString &invitationTimeTable) |
Add a block in week. More... | |
void | ptimetable_blockToTex (PLatexObj &obj, const PTimeTableBlock &block) |
Convert a PTimeTableBlock into PLatexObj. More... | |
bool | ptimetable_checkBlockExist (const PTimeTableBlock *&foundBlock, const std::map< PString, PTimeTableBlock > &mapBlock, const PString &timeText) |
Check if a block exists at a given time. More... | |
void | ptimetable_compelteDayEmptyBlock (TexDay &day, const std::map< PString, PString > &mapHour) |
Complete day with empty blocks to make them coherent. More... | |
void | ptimetable_completeEmptyBlock (TexTimetable &texTimetable) |
Complete day of timetable with empty blocks to make them coherent. More... | |
void | ptimetable_createTabCell (PLatexObj &cell, const PString &text) |
Create a table cell. More... | |
void | ptimetable_createTexTimeTable (TexTimetable &texTimetable, const PTimeTable &timetable) |
Create the TexTimetable. More... | |
PString | ptimetable_dateToStr (const PLatexDate &date) |
Convert a date into a string which can be used in a std::map. More... | |
PString | ptimetable_dateToText (const PLatexDate &date) |
Convert a date into a string. More... | |
void | ptimetable_singleDay (TexDay &out, std::map< PString, PString > &mapHour, const TexDay &day) |
Create a single day with consistent mapHour. More... | |
bool | ptimetable_tex (std::vector< PLatexObj > &vecContent, const PTimeTable &timetable, const PPath &outputDirectory, bool isSaveSpeaker) |
Convert a PTimeTable into PLatexObj. More... | |
void | ptimetable_texChapter (std::vector< PLatexObj > &vecContent, const TexWeek &week, const TexTimetable &texTimetable) |
Convert a PTimeTable into PLatexObj. More... | |
void | ptimetable_texLecture (std::vector< PLatexObj > &vecContent, const PTimeTableBlock &block, const TexTimetable &texTimetable) |
Save lectures in PLatexObj. More... | |
void | ptimetable_texPart (std::vector< PLatexObj > &vecContent, const TexTimetable &texTimetable) |
Convert a PTimeTable into PLatexObj. More... | |
void | ptimetable_texSection (std::vector< PLatexObj > &vecContent, const TexDay &day, const TexTimetable &texTimetable, const TexWeek &week) |
Convert a PTimeTable into PLatexObj. More... | |
PString | ptimetable_timeToStr (const PLatexTime &texTime) |
Convert a PLatexTime into a string. More... | |
void | ptimetable_toTex (PLatexObj &obj, const TexTimetable &texTimetable) |
Convert a TexTimetable into a PLatexObj. More... | |
void | ptimetable_updateBlockTimeRow (PTimeTableBlock &block, const std::map< PString, PString > &mapHour) |
Update the time rows of the PTimeTableBlock. More... | |
void | ptimetable_updateTimeRow (TexTimetable &texTimetable) |
Update the time rows of the PTimeTableBlock. More... | |
void | ptimetable_updateWeekLaterTime (TexWeek &week, const PLatexTime &texTime) |
Update the later time of the week. More... | |
void ptimetable_addBlockInWeek | ( | TexWeek & | week, |
const PTimeTableBlock & | block, | ||
const PString & | invitationTimeTable | ||
) |
Add a block in week.
[out] | week | : TexWeek to be updated |
block | : PTimeTableBlock to be added into the week | |
invitationTimeTable | : invitation of the full timetable |
Update the later time of the week
Definition at line 63 of file ptimetable_tex.cpp.
References TexDay::date, PTimeTableBlock::getBeginTime(), PTimeTableBlock::getDate(), PTimeTableBlock::getEndTime(), TexDay::invitation, TexDay::mapBlock, TexWeek::mapDay, TexWeek::mapHour, ptimetable_dateToStr(), ptimetable_timeToStr(), and ptimetable_updateWeekLaterTime().
Referenced by ptimetable_createTexTimeTable().
void ptimetable_blockToTex | ( | PLatexObj & | obj, |
const PTimeTableBlock & | block | ||
) |
Convert a PTimeTableBlock into PLatexObj.
[out] | vecContent | : vector of PLatexObj to be updated |
block | : PTimeTableBlock to be converted |
Definition at line 220 of file ptimetable_tex.cpp.
References PTimeTableBlock::getInvitation(), PTimeTableBlock::getIsEmptyBlock(), PTimeTableBlock::getNbTimeRow(), PTimeTableBlock::getStyle(), PTimeTableBlock::getTitle(), PLatexObj::getVecContent(), PTimeTableBlock::getVecSpeaker(), LATEX_INVITATION_OUTPUT_DIR, platexobj_createRef(), platexobj_createRendezVous(), PLatexObj::setRowSpan(), PLatexObj::setText(), PLatexObj::setType(), PLatexType::TIMETABLE_BLOCK, and PLatexType::TIMETABLE_EMPTYBLOCK.
Referenced by ptimetable_toTex().
bool ptimetable_checkBlockExist | ( | const PTimeTableBlock *& | foundBlock, |
const std::map< PString, PTimeTableBlock > & | mapBlock, | ||
const PString & | timeText | ||
) |
Check if a block exists at a given time.
[out] | foundBlock | : pointer to the found block, if there is one (NULL otherwise) |
mapBlock | : map of blocks to be checked | |
timeText | : time to be searched |
Definition at line 123 of file ptimetable_tex.cpp.
Referenced by ptimetable_compelteDayEmptyBlock().
void ptimetable_compelteDayEmptyBlock | ( | TexDay & | day, |
const std::map< PString, PString > & | mapHour | ||
) |
Complete day with empty blocks to make them coherent.
[out] | day | : TexDay to be completed |
mapHour | : map of hours in the week |
Definition at line 138 of file ptimetable_tex.cpp.
References PTimeTableBlock::getEndTime(), TexDay::mapBlock, ptimetable_checkBlockExist(), ptimetable_timeToStr(), and PTimeTableBlock::setIsEmptyBlock().
Referenced by ptimetable_completeEmptyBlock().
void ptimetable_completeEmptyBlock | ( | TexTimetable & | texTimetable | ) |
Complete day of timetable with empty blocks to make them coherent.
[out] | texTimetable | : TexTimetable to be completed |
Definition at line 164 of file ptimetable_tex.cpp.
References ptimetable_compelteDayEmptyBlock(), and TexTimetable::vecWeek.
Referenced by ptimetable_tex().
Create a table cell.
[out] | cell | : cell of a table |
text | : text to write in the cell |
Definition at line 246 of file ptimetable_tex.cpp.
References PLatexObj::getVecContent(), PLatexObj::setText(), PLatexObj::setType(), PLatexType::TEXT, and PLatexType::TIMETABLE_BLOCK.
void ptimetable_createTexTimeTable | ( | TexTimetable & | texTimetable, |
const PTimeTable & | timetable | ||
) |
Create the TexTimetable.
[out] | texTimetable | : created TexTimetable |
timetable | : PTimeTable to be used to create the TexTimetable |
Definition at line 88 of file ptimetable_tex.cpp.
References PTimeTable::getInvitation(), PTimeTable::getVecBlock(), PTimeTable::getVecSpeaker(), TexTimetable::invitation, TexWeek::laterTime, TexTimetable::mapSpeaker, ptimetable_addBlockInWeek(), PLatexTime::setHour(), PLatexTime::setMinute(), and TexTimetable::vecWeek.
Referenced by ptimetable_tex().
PString ptimetable_dateToStr | ( | const PLatexDate & | date | ) |
Convert a date into a string which can be used in a std::map.
date | : PLatexDate to be converted in to a string |
Definition at line 17 of file ptimetable_tex.cpp.
References PLatexDate::getDay(), PLatexDate::getMonth(), and PLatexDate::getYear().
Referenced by ptimetable_addBlockInWeek(), and ptimetable_texSection().
PString ptimetable_dateToText | ( | const PLatexDate & | date | ) |
Convert a date into a string.
date | : PLatexDate to be converted in to a string |
Definition at line 27 of file ptimetable_tex.cpp.
References PLatexDate::getDay(), PLatexDate::getMonth(), and PLatexDate::getYear().
Referenced by ptimetable_texLecture(), and ptimetable_texSection().
void ptimetable_singleDay | ( | TexDay & | out, |
std::map< PString, PString > & | mapHour, | ||
const TexDay & | day | ||
) |
Create a single day with consistent mapHour.
[out] | out | : output updated TexDay |
[out] | mapHour | : output updated map of hours |
day | : TexDay to be updated |
Definition at line 329 of file ptimetable_tex.cpp.
References TexDay::date, TexDay::invitation, TexDay::mapBlock, ptimetable_timeToStr(), and PTimeTableBlock::setNbTimeRow().
Referenced by ptimetable_texSection().
bool ptimetable_tex | ( | std::vector< PLatexObj > & | vecContent, |
const PTimeTable & | timetable, | ||
const PPath & | outputDirectory, | ||
bool | isSaveSpeaker | ||
) |
Convert a PTimeTable into PLatexObj.
[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 |
Definition at line 478 of file ptimetable_tex.cpp.
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().
void ptimetable_texChapter | ( | std::vector< PLatexObj > & | vecContent, |
const TexWeek & | week, | ||
const TexTimetable & | texTimetable | ||
) |
Convert a PTimeTable into PLatexObj.
[out] | vecContent | : vector of PLatexObj to be completed with PTimeTable |
week | : TexWeek to be converted into PLatexObj | |
texTimetable | : full timetable TexTimetable |
Definition at line 435 of file ptimetable_tex.cpp.
References PLatexType::CHAPTER, PLatexObj::getVecContent(), TexWeek::invitation, TexTimetable::invitation, LATEX_INVITATION_OUTPUT_DIR, TexWeek::mapDay, platexobj_createRendezVous(), platexobj_createSection(), ptimetable_texSection(), ptimetable_toTex(), TexTimetable::vecWeek, and TexWeek::weekTitle.
Referenced by ptimetable_texPart().
void ptimetable_texLecture | ( | std::vector< PLatexObj > & | vecContent, |
const PTimeTableBlock & | block, | ||
const TexTimetable & | texTimetable | ||
) |
Save lectures in PLatexObj.
[out] | vecContent | : vector of PLatexObj to be completed with TexTimetable |
block | : PTimeTableBlock to be converted into PLatexObj | |
texTimetable | : full timetable TexTimetable |
Definition at line 350 of file ptimetable_tex.cpp.
References PTimeTableBlock::getBeginTime(), PTimeTableBlock::getDate(), PTimeTableBlock::getDescription(), PTimeTableBlock::getEndTime(), PTimeTableBlock::getInvitation(), PTimeTableBlock::getLocation(), PLatexSpeaker::getName(), PTimeTableBlock::getTitle(), PLatexObj::getVecContent(), PTimeTableBlock::getVecSpeaker(), LATEX_INVITATION_OUTPUT_DIR, TexTimetable::mapSpeaker, platexobj_createItem(), platexobj_createItemize(), platexobj_createNewLine(), platexobj_createParagraph(), platexobj_createRef(), platexobj_createRendezVous(), platexobj_createSection(), platexobj_createText(), platexobj_createTextBf(), ptimetable_dateToText(), ptimetable_timeToStr(), PLatexType::SUBSECTION, and PLatexType::SUBSUBSECTIONSTAR.
Referenced by ptimetable_texSection().
void ptimetable_texPart | ( | std::vector< PLatexObj > & | vecContent, |
const TexTimetable & | texTimetable | ||
) |
Convert a PTimeTable into PLatexObj.
[out] | vecContent | : vector of PLatexObj to be completed with PTimeTable |
texTimetable | : TexTimetable to be converted into PLatexObj |
Definition at line 463 of file ptimetable_tex.cpp.
References ptimetable_texChapter(), and TexTimetable::vecWeek.
Referenced by ptimetable_tex().
void ptimetable_texSection | ( | std::vector< PLatexObj > & | vecContent, |
const TexDay & | day, | ||
const TexTimetable & | texTimetable, | ||
const TexWeek & | week | ||
) |
Convert a PTimeTable into PLatexObj.
[out] | vecContent | : vector of PLatexObj to be completed with PTimeTable |
day | : TexDay to be converted into PLatexObj | |
texTimetable | : full timetable TexTimetable | |
week | : current week of the day |
Definition at line 396 of file ptimetable_tex.cpp.
References TexDay::date, TexDay::invitation, TexWeek::invitation, TexTimetable::invitation, LATEX_INVITATION_OUTPUT_DIR, TexDay::mapBlock, TexWeek::mapDay, TexWeek::mapHour, platexobj_createRendezVous(), platexobj_createSection(), platexobj_createText(), ptimetable_dateToStr(), ptimetable_dateToText(), ptimetable_singleDay(), ptimetable_texLecture(), ptimetable_toTex(), PLatexType::SECTION, TexTimetable::vecWeek, and TexWeek::weekTitle.
Referenced by ptimetable_texChapter().
PString ptimetable_timeToStr | ( | const PLatexTime & | texTime | ) |
Convert a PLatexTime into a string.
texTime | : PLatexTime to be converted in to a string |
Definition at line 37 of file ptimetable_tex.cpp.
References PLatexTime::getHour(), and PLatexTime::getMinute().
Referenced by ptimetable_addBlockInWeek(), ptimetable_compelteDayEmptyBlock(), ptimetable_singleDay(), ptimetable_texLecture(), and ptimetable_updateBlockTimeRow().
void ptimetable_toTex | ( | PLatexObj & | obj, |
const TexTimetable & | texTimetable | ||
) |
Convert a TexTimetable into a PLatexObj.
[out] | obj | : PLatexObj from TexTimetable |
texTimetable | : TexTimetable |
Definition at line 259 of file ptimetable_tex.cpp.
References PLatexObj::getComplexTitle(), PLatexDate::getDay(), PLatexDate::getMonth(), PLatexObj::getVecContent(), PLatexDate::getYear(), TexTimetable::invitation, LATEX_INVITATION_OUTPUT_DIR, platexobj_createNone(), platexobj_createRef(), platexobj_createRendezVous(), platexobj_createText(), platexobj_createTimetableBlock(), platexobj_createTimetableTimeRow(), ptimetable_blockToTex(), PLatexObj::setLabelName(), PLatexObj::setText(), PLatexObj::setType(), PLatexType::TIMETABLE, PLatexType::TIMETABLE_TIME, PLatexType::TIMETABLE_TIMEROW, PLatexType::TIMETABLE_WEEK, and TexTimetable::vecWeek.
Referenced by ptimetable_tex(), ptimetable_texChapter(), and ptimetable_texSection().
void ptimetable_updateBlockTimeRow | ( | PTimeTableBlock & | block, |
const std::map< PString, PString > & | mapHour | ||
) |
Update the time rows of the PTimeTableBlock.
[out] | block | : PTimeTableBlock to be updated |
mapHour | : map of all the begining hours in the week |
Definition at line 181 of file ptimetable_tex.cpp.
References PTimeTableBlock::getBeginTime(), PTimeTableBlock::getEndTime(), ptimetable_timeToStr(), and PTimeTableBlock::setNbTimeRow().
Referenced by ptimetable_updateTimeRow().
void ptimetable_updateTimeRow | ( | TexTimetable & | texTimetable | ) |
Update the time rows of the PTimeTableBlock.
[out] | texTimetable | : TexTimetable to be updated |
Definition at line 199 of file ptimetable_tex.cpp.
References ptimetable_updateBlockTimeRow(), and TexTimetable::vecWeek.
Referenced by ptimetable_tex().
void ptimetable_updateWeekLaterTime | ( | TexWeek & | week, |
const PLatexTime & | texTime | ||
) |
Update the later time of the week.
[out] | week | : TexWeek to be udpated |
texTime | : PLatexTime |
Definition at line 47 of file ptimetable_tex.cpp.
References PLatexTime::getHour(), PLatexTime::getMinute(), and TexWeek::laterTime.
Referenced by ptimetable_addBlockInWeek().