18 std::stringstream dateStr;
19 dateStr << date.
getYear() <<
"-" << std::setfill(
'0') << std::setw(2) << date.
getMonth() <<
"-" << std::setfill(
'0') << std::setw(2) << date.
getDay();
28 std::stringstream dateStr;
29 dateStr << std::setfill(
'0') << std::setw(2) << date.
getDay() <<
"/" << std::setfill(
'0') << std::setw(2) << date.
getMonth() <<
"/" << date.
getYear();
38 std::stringstream timeStr;
39 timeStr << std::setfill(
'0') << std::setw(2) << texTime.
getHour() <<
":" << std::setfill(
'0') << std::setw(2) << texTime.
getMinute();
70 std::map<PString, TexDay> & mapDay = week.
mapDay;
71 std::map<PString, TexDay>::iterator it(mapDay.find(blockDate));
72 if(it != mapDay.end()){
73 it->second.mapBlock[beginTime] = block;
75 TexDay & day = mapDay[blockDate];
77 day.
invitation = invitationTimeTable +
"_" + blockDate;
89 const std::vector<PTimeTableBlock> & vecBlock = timetable.
getVecBlock();
90 std::vector<TexWeek> & vecWeek = texTimetable.
vecWeek;
97 vecWeek.push_back(emptyWeek);
100 for(std::vector<PTimeTableBlock>::const_iterator it(vecBlock.begin()); it != vecBlock.end(); ++it){
101 if(it->getWeekTitle().getVecContent().size() != 0lu){
102 vecWeek.push_back(emptyWeek);
103 vecWeek.back().weekTitle = it->getWeekTitle();
104 vecWeek.back().invitation = it->getInvitation();
106 if(it->getTitle().getVecContent().size() != 0lu){
111 const std::vector<PLatexSpeaker> & vecSpeaker = timetable.
getVecSpeaker();
112 for(std::vector<PLatexSpeaker>::const_iterator it(vecSpeaker.begin()); it != vecSpeaker.end(); ++it){
113 texTimetable.
mapSpeaker[it->getLabel()] = *it;
124 std::map<PString, PTimeTableBlock>::const_iterator it(mapBlock.find(timeText));
125 if(it != mapBlock.end()){
126 foundBlock = &(it->second);
139 std::map<PString, PTimeTableBlock> & mapBlock = day.
mapBlock;
141 std::map<PString, PString>::const_iterator itHour(mapHour.begin());
142 while(itHour != mapHour.end()){
143 PString currentTime(itHour->first);
150 itHour = mapHour.find(endTime);
155 mapBlock[currentTime] = emptyBlock;
166 std::vector<TexWeek> & vecWeek = texTimetable.
vecWeek;
167 for(std::vector<TexWeek>::iterator itWeek(vecWeek.begin()); itWeek != vecWeek.end(); ++itWeek){
169 std::map<PString, TexDay> & mapDay = itWeek->mapDay;
170 std::map<PString, PString> & mapHour = itWeek->mapHour;
171 for(std::map<PString, TexDay>::iterator itDay(mapDay.begin()); itDay != mapDay.end(); ++itDay){
185 std::map<PString, PString>::const_iterator itBeginTime = mapHour.find(beginTime);
186 std::map<PString, PString>::const_iterator itEndTime = mapHour.find(endTime);
187 if(itBeginTime != mapHour.end() && itEndTime != mapHour.end()){
188 size_t nbHourBlock(0lu);
189 for(std::map<PString, PString>::const_iterator it(itBeginTime); it != itEndTime && it != mapHour.end(); ++it){
201 std::vector<TexWeek> & vecWeek = texTimetable.
vecWeek;
202 for(std::vector<TexWeek>::iterator itWeek(vecWeek.begin()); itWeek != vecWeek.end(); ++itWeek){
204 std::map<PString, TexDay> & mapDay = itWeek->mapDay;
205 std::map<PString, PString> & mapHour = itWeek->mapHour;
206 for(std::map<PString, TexDay>::iterator itDay(mapDay.begin()); itDay != mapDay.end(); ++itDay){
208 std::map<PString, PTimeTableBlock> & mapBlock = itDay->second.mapBlock;
209 for(std::map<PString, PTimeTableBlock>::iterator itBlock(mapBlock.begin()); itBlock != mapBlock.end(); ++itBlock){
263 const std::vector<TexWeek> & vecWeek = texTimetable.
vecWeek;
264 for(std::vector<TexWeek>::const_iterator itWeek(vecWeek.begin()); itWeek != vecWeek.end(); ++itWeek){
265 if(itWeek->mapDay.size() == 0lu){
continue;}
268 if(itWeek->invitation !=
""){
274 const std::map<PString, PString> & mapHour = itWeek->mapHour;
275 const std::map<PString, TexDay> & mapDay = itWeek->mapDay;
280 for(std::map<PString, TexDay>::const_iterator itDay(mapDay.begin()); itDay != mapDay.end(); ++itDay){
282 std::stringstream dateStr;
283 dateStr << std::setfill(
'0') << std::setw(2) << date.
getDay() <<
"/" << std::setfill(
'0') << std::setw(2) << date.
getMonth() <<
"/" << date.
getYear();
286 if(itDay->second.invitation !=
""){
297 for(std::map<PString, PString>::const_iterator itHour(mapHour.begin()); itHour != mapHour.end(); ++itHour){
302 textTime.
setText(itHour->first);
307 for(std::map<PString, TexDay>::const_iterator itDay(mapDay.begin()); itDay != mapDay.end(); ++itDay){
309 const std::map<PString, PTimeTableBlock> & mapBlock = itDay->second.mapBlock;
310 std::map<PString, PTimeTableBlock>::const_iterator itBlock(mapBlock.find(itHour->first));
311 if(itBlock != mapBlock.end()){
332 const std::map<PString, PTimeTableBlock> & mapBlock = day.
mapBlock;
333 for(std::map<PString, PTimeTableBlock>::const_iterator it(mapBlock.begin()); it != mapBlock.end(); ++it){
334 if(it->second.getIsEmptyBlock()){
continue;}
336 mapHour[beginTime] =
"";
372 const std::vector<PString> & vecSpeaker = block.
getVecSpeaker();
373 const std::map<PString, PLatexSpeaker> & mapSpeaker = texTimetable.
mapSpeaker;
374 for(std::vector<PString>::const_iterator itSpeaker(vecSpeaker.begin()); itSpeaker != vecSpeaker.end(); ++itSpeaker){
375 std::map<PString, PLatexSpeaker>::const_iterator it(mapSpeaker.find(*itSpeaker));
376 if(it != mapSpeaker.end()){
380 std::cerr <<
"ptimetable_texLecture : speaker '"<<(*itSpeaker)<<
"' not found in map of speakers" << std::endl;
383 vecContent.push_back(listSpeaker);
400 vecContent.push_back(sectionTitle);
416 dayTimetable.
vecWeek.push_back(weekTimeTable);
420 vecContent.push_back(timetableObj);
422 const std::map<PString, PTimeTableBlock> & mapBlock = day.
mapBlock;
423 for(std::map<PString, PTimeTableBlock>::const_iterator it(mapBlock.begin()); it != mapBlock.end(); ++it){
424 if(it->second.getIsEmptyBlock()){
continue;}
438 vecContent.push_back(chapterTitle);
447 weekTimetable.
vecWeek.push_back(week);
450 vecContent.push_back(timetableObj);
452 const std::map<PString, TexDay> & mapDay = week.
mapDay;
453 for(std::map<PString, TexDay>::const_iterator itDay(mapDay.begin()); itDay != mapDay.end(); ++itDay){
464 const std::vector<TexWeek> & vecWeek = texTimetable.
vecWeek;
465 for(std::vector<TexWeek>::const_iterator itWeek(vecWeek.begin()); itWeek != vecWeek.end(); ++itWeek){
466 if(itWeek->mapDay.size() == 0lu){
continue;}
481 std::cerr <<
"ptimetable_tex : call ptimetable_createTexTimeTable" << std::endl;
484 std::cerr <<
"ptimetable_tex : call ptimetable_completeEmptyBlock" << std::endl;
487 std::cerr <<
"ptimetable_tex : call ptimetable_updateTimeRow" << std::endl;
490 std::cerr <<
"ptimetable_tex : call ptimetable_toTex" << std::endl;
497 vecContent.push_back(timetableObj);
#define LATEX_INVITATION_OUTPUT_DIR
size_t getMonth() const
Gets the month of the PLatexDate.
size_t getYear() const
Gets the year of the PLatexDate.
size_t getDay() const
Gets the day of the PLatexDate.
const std::vector< PLatexObj > & getVecContent() const
Gets the vecContent of the PLatexObj.
void setLabelName(const PString &labelName)
Sets the labelName of the PLatexObj.
const std::vector< PLatexObj > & getComplexTitle() const
Gets the complexTitle of the PLatexObj.
void setRowSpan(long unsigned int rowSpan)
Sets the rowSpan of the PLatexObj.
void setType(const PLatexType::PLatexType &type)
Sets the type of the PLatexObj.
void setText(const PString &text)
Sets the text of the PLatexObj.
Describe a speaker in a timetable.
const PLatexObj & getName() const
Gets the name of the PLatexSpeaker.
size_t getMinute() const
Gets the minute of the PLatexTime.
void setMinute(size_t minute)
Sets the minute of the PLatexTime.
void setHour(size_t hour)
Sets the hour of the PLatexTime.
size_t getHour() const
Gets the hour of the PLatexTime.
Path of a directory or a file.
PLatexObj platexobj_createRef(const PString &label, const PString &text)
Create a reference (REF)
PLatexObj platexobj_createNewLine()
Create a new line.
PLatexObj platexobj_createText(const PString &text, const PString &label)
Create a TEXT.
PLatexObj platexobj_createItem(const PLatexObj &obj)
Create an ITEM.
PLatexObj platexobj_createRendezVous(const PPath &fileNameIcs)
Create a RENDEZVOUS.
PLatexObj platexobj_createTimetableBlock(const PString &blockStyle)
Create a TIMETABLE_BLOCK.
PLatexObj platexobj_createNone()
Create a NONE PLatexObj.
PLatexObj platexobj_createSection(PLatexType::PLatexType sectionType, const PLatexObj &complexTitle, const PString &label)
Create a part, chapter, section, subsection, subsubsection.
PLatexObj platexobj_createParagraph(const PString &text, const PString &label)
Create a PARAGRAPH.
PLatexObj platexobj_createItemize()
Create an ITEMIZE.
PLatexObj platexobj_createTimetableTimeRow()
Create an TIMETABLE_TIMEROW.
PLatexObj platexobj_createTextBf(const PString &text, const PString &label)
Create a TEXT.
void pspeaker_tex(std::vector< PLatexObj > &vecContent, const std::vector< PLatexSpeaker > &vecSpeaker, const PString §ionLabel)
Save all speakers of the given PTimeTable into a vector of PLatexObj.
std::map< PString, PTimeTableBlock > mapBlock
Map of the block of a day (time format hour:minute)
PString invitation
Invitation of the day.
PLatexDate date
Date of the current day.
PString invitation
Invitation of the full event.
std::vector< TexWeek > vecWeek
Vector of week.
std::map< PString, PLatexSpeaker > mapSpeaker
Map of Speaker.
std::map< PString, PString > mapHour
Map of the hours of the blocks in the week.
PLatexTime laterTime
Later time of all days.
PLatexObj weekTitle
Title of the week.
std::map< PString, TexDay > mapDay
Map of hte day in the week (date format: year-month-day)
PString invitation
Invitation of the week.