PhoenixLecture  2.0.0
Set of tools to make lectures
PTimeTable.h
Go to the documentation of this file.
1 /***************************************
2  Auteur : Pierre Aubert
3  Mail : pierre.aubert@lapp.in2p3.fr
4  Licence : CeCILL-C
5 ****************************************/
6 
7 
8 
9 #ifndef __PTIMETABLE_H__
10 #define __PTIMETABLE_H__
11 
12 #include "PLatexObj.h"
13 
16  public:
17  PLatexSpeaker();
18  PLatexSpeaker(const PLatexSpeaker & other);
19  virtual ~PLatexSpeaker();
20  PLatexSpeaker & operator = (const PLatexSpeaker & other);
21  void setName(const PLatexObj & name);
22  void setTitle(const PLatexObj & title);
23  void setLabel(const PString & label);
24  void setJob(const PLatexObj & job);
25  void setAffiliation(const PLatexObj & affiliation);
26  void setDescription(const PLatexObj & description);
27  const PLatexObj & getName() const;
28  PLatexObj & getName();
29  const PLatexObj & getTitle() const;
30  PLatexObj & getTitle();
31  const PString & getLabel() const;
32  PString & getLabel();
33  const PLatexObj & getJob() const;
34  PLatexObj & getJob();
35  const PLatexObj & getAffiliation() const;
37  const PLatexObj & getDescription() const;
39  protected:
40  void copyPLatexSpeaker(const PLatexSpeaker & other);
41  private:
55 };
56 
58 class PLatexDate{
59  public:
60  PLatexDate();
61  PLatexDate(const PLatexDate & other);
62  virtual ~PLatexDate();
63  PLatexDate & operator = (const PLatexDate & other);
64  void setYear(size_t year);
65  void setMonth(size_t month);
66  void setDay(size_t day);
67  size_t getYear() const;
68  size_t & getYear();
69  size_t getMonth() const;
70  size_t & getMonth();
71  size_t getDay() const;
72  size_t & getDay();
73  protected:
74  void copyPLatexDate(const PLatexDate & other);
75  private:
78  size_t p_year;
80  size_t p_month;
82  size_t p_day;
83 };
84 
86 class PLatexTime{
87  public:
88  PLatexTime();
89  PLatexTime(const PLatexTime & other);
90  virtual ~PLatexTime();
91  PLatexTime & operator = (const PLatexTime & other);
92  void setHour(size_t hour);
93  void setMinute(size_t minute);
94  size_t getHour() const;
95  size_t & getHour();
96  size_t getMinute() const;
97  size_t & getMinute();
98  protected:
99  void copyPLatexTime(const PLatexTime & other);
100  private:
103  size_t p_hour;
104  //Minutes
105  size_t p_minute;
106 };
107 
110  public:
111  PTimeTableBlock();
112  PTimeTableBlock(const PTimeTableBlock & other);
113  virtual ~PTimeTableBlock();
115  void setMainUrl(const PString & mainUrl);
116  void setTitle(const PLatexObj & title);
117  void setWeekTitle(const PLatexObj & weekTitle);
118  void setVecSpeaker(const std::vector<PString> & vecSpeaker);
119  void setInvitation(const PString & invitation);
120  void setDescription(const PLatexObj & description);
121  void setDate(const PLatexDate & date);
122  void setBeginTime(const PLatexTime & beginTime);
123  void setEndTime(const PLatexTime & endTime);
124  void setDuration(const PLatexTime & duration);
125  void setQuestionTime(const PLatexTime & questionTime);
126  void setLocation(const PLatexObj & location);
127  void setStyle(const PString & style);
128  void setNbTimeRow(size_t nbTimeRow);
129  void setIsEmptyBlock(bool isEmptyBlock);
130  const PString & getMainUrl() const;
131  PString & getMainUrl();
132  const PLatexObj & getTitle() const;
133  PLatexObj & getTitle();
134  const PLatexObj & getWeekTitle() const;
136  const std::vector<PString> & getVecSpeaker() const;
137  std::vector<PString> & getVecSpeaker();
138  const PString & getInvitation() const;
140  const PLatexObj & getDescription() const;
142  const PLatexDate & getDate() const;
143  PLatexDate & getDate();
144  const PLatexTime & getBeginTime() const;
146  const PLatexTime & getEndTime() const;
148  const PLatexTime & getDuration() const;
150  const PLatexTime & getQuestionTime() const;
152  const PLatexObj & getLocation() const;
154  const PString & getStyle() const;
155  PString & getStyle();
156  size_t getNbTimeRow() const;
157  size_t & getNbTimeRow();
158  bool getIsEmptyBlock() const;
159  bool & getIsEmptyBlock();
160  protected:
161  void copyPTimeTableBlock(const PTimeTableBlock & other);
162  private:
171  std::vector<PString> p_vecSpeaker;
191  size_t p_nbTimeRow;
194 };
195 
198  public:
199  PTimeTable();
200  PTimeTable(const PTimeTable & other);
201  virtual ~PTimeTable();
202  PTimeTable & operator = (const PTimeTable & other);
203  void setMainUrl(const PString & mainUrl);
204  void setName(const PLatexObj & name);
205  void setInvitation(const PString & invitation);
206  void setBeginDate(const PLatexDate & beginDate);
207  void setEndDate(const PLatexDate & endDate);
208  void setFirstDay(const PString & firstDay);
209  void setLocation(const PLatexObj & location);
210  void setVecBlock(const std::vector<PTimeTableBlock> & vecBlock);
211  void setVecSpeaker(const std::vector<PLatexSpeaker> & vecSpeaker);
212  const PString & getMainUrl() const;
213  PString & getMainUrl();
214  const PLatexObj & getName() const;
215  PLatexObj & getName();
216  const PString & getInvitation() const;
218  const PLatexDate & getBeginDate() const;
220  const PLatexDate & getEndDate() const;
222  const PString & getFirstDay() const;
223  PString & getFirstDay();
224  const PLatexObj & getLocation() const;
226  const std::vector<PTimeTableBlock> & getVecBlock() const;
227  std::vector<PTimeTableBlock> & getVecBlock();
228  const std::vector<PLatexSpeaker> & getVecSpeaker() const;
229  std::vector<PLatexSpeaker> & getVecSpeaker();
230  protected:
231  void copyPTimeTable(const PTimeTable & other);
232  private:
249  std::vector<PTimeTableBlock> p_vecBlock;
251  std::vector<PLatexSpeaker> p_vecSpeaker;
252 };
253 
254 
255 
256 #endif
257 
Describes a date.
Definition: PTimeTable.h:58
size_t getMonth() const
Gets the month of the PLatexDate.
Definition: PTimeTable.cpp:245
PLatexDate()
Constructor of class PLatexDate.
Definition: PTimeTable.cpp:182
void setMonth(size_t month)
Sets the month of the PLatexDate.
Definition: PTimeTable.cpp:217
virtual ~PLatexDate()
Destructor of class PLatexDate.
Definition: PTimeTable.cpp:194
size_t getYear() const
Gets the year of the PLatexDate.
Definition: PTimeTable.cpp:231
void setYear(size_t year)
Sets the year of the PLatexDate.
Definition: PTimeTable.cpp:210
void setDay(size_t day)
Sets the day of the PLatexDate.
Definition: PTimeTable.cpp:224
size_t p_year
Year.
Definition: PTimeTable.h:78
size_t p_month
Month.
Definition: PTimeTable.h:80
void copyPLatexDate(const PLatexDate &other)
Copy Function of class PLatexDate.
Definition: PTimeTable.cpp:273
PLatexDate & operator=(const PLatexDate &other)
Operator = of class PLatexDate.
Definition: PTimeTable.cpp:202
size_t getDay() const
Gets the day of the PLatexDate.
Definition: PTimeTable.cpp:259
void initialisationPLatexDate()
Initialisation Function of class PLatexDate.
Definition: PTimeTable.cpp:280
size_t p_day
Day.
Definition: PTimeTable.h:82
Describe a latex object.
Definition: PLatexObj.h:40
Describe a speaker in a timetable.
Definition: PTimeTable.h:15
PLatexSpeaker & operator=(const PLatexSpeaker &other)
Operator = of class PLatexSpeaker.
Definition: PTimeTable.cpp:33
void copyPLatexSpeaker(const PLatexSpeaker &other)
Copy Function of class PLatexSpeaker.
Definition: PTimeTable.cpp:167
void setLabel(const PString &label)
Sets the label of the PLatexSpeaker.
Definition: PTimeTable.cpp:55
PLatexObj p_title
Title of the speaker (Doctor, Professor, etc)
Definition: PTimeTable.h:46
PLatexObj p_description
Description of the speaker.
Definition: PTimeTable.h:54
void setJob(const PLatexObj &job)
Sets the job of the PLatexSpeaker.
Definition: PTimeTable.cpp:62
void setName(const PLatexObj &name)
Sets the name of the PLatexSpeaker.
Definition: PTimeTable.cpp:41
void setAffiliation(const PLatexObj &affiliation)
Sets the affiliation of the PLatexSpeaker.
Definition: PTimeTable.cpp:69
PLatexObj p_name
Name of the speaker.
Definition: PTimeTable.h:44
PLatexObj p_affiliation
Affiliation of the speaker.
Definition: PTimeTable.h:52
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
void setDescription(const PLatexObj &description)
Sets the description of the PLatexSpeaker.
Definition: PTimeTable.cpp:76
virtual ~PLatexSpeaker()
Destructor of class PLatexSpeaker.
Definition: PTimeTable.cpp:25
PLatexObj p_job
Job of the speaker.
Definition: PTimeTable.h:50
PString p_label
Label to reference the speaker in the timetable.
Definition: PTimeTable.h:48
void setTitle(const PLatexObj &title)
Sets the title of the PLatexSpeaker.
Definition: PTimeTable.cpp:48
void initialisationPLatexSpeaker()
Initialisation Function of class PLatexSpeaker.
Definition: PTimeTable.cpp:177
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
PLatexSpeaker()
Constructor of class PLatexSpeaker.
Definition: PTimeTable.cpp:13
const PLatexObj & getJob() const
Gets the job of the PLatexSpeaker.
Definition: PTimeTable.cpp:125
Describes a date.
Definition: PTimeTable.h:86
size_t p_hour
Hours.
Definition: PTimeTable.h:103
virtual ~PLatexTime()
Destructor of class PLatexTime.
Definition: PTimeTable.cpp:299
size_t getMinute() const
Gets the minute of the PLatexTime.
Definition: PTimeTable.cpp:343
PLatexTime & operator=(const PLatexTime &other)
Operator = of class PLatexTime.
Definition: PTimeTable.cpp:307
void copyPLatexTime(const PLatexTime &other)
Copy Function of class PLatexTime.
Definition: PTimeTable.cpp:357
PLatexTime()
Constructor of class PLatexTime.
Definition: PTimeTable.cpp:287
void setMinute(size_t minute)
Sets the minute of the PLatexTime.
Definition: PTimeTable.cpp:322
void initialisationPLatexTime()
Initialisation Function of class PLatexTime.
Definition: PTimeTable.cpp:363
void setHour(size_t hour)
Sets the hour of the PLatexTime.
Definition: PTimeTable.cpp:315
size_t getHour() const
Gets the hour of the PLatexTime.
Definition: PTimeTable.cpp:329
size_t p_minute
Definition: PTimeTable.h:105
Extends the std::string.
Definition: PString.h:16
Block of a Timetable.
Definition: PTimeTable.h:109
void setDate(const PLatexDate &date)
Sets the date of the PTimeTableBlock.
Definition: PTimeTable.cpp:439
void initialisationPTimeTableBlock()
Initialisation Function of class PTimeTableBlock.
Definition: PTimeTable.cpp:731
const PLatexObj & getTitle() const
Gets the title of the PTimeTableBlock.
Definition: PTimeTable.cpp:516
bool getIsEmptyBlock() const
Gets the isEmptyBlock of the PTimeTableBlock.
Definition: PTimeTable.cpp:698
PLatexObj p_description
Description of the block.
Definition: PTimeTable.h:175
void copyPTimeTableBlock(const PTimeTableBlock &other)
Copy Function of class PTimeTableBlock.
Definition: PTimeTable.cpp:712
void setDescription(const PLatexObj &description)
Sets the description of the PTimeTableBlock.
Definition: PTimeTable.cpp:432
PLatexTime p_duration
Duration of the block.
Definition: PTimeTable.h:183
virtual ~PTimeTableBlock()
Destructor of class PTimeTableBlock.
Definition: PTimeTable.cpp:381
PLatexTime p_questionTime
Duration of the questions in this block (included in duraction time)
Definition: PTimeTable.h:185
size_t getNbTimeRow() const
Gets the nbTimeRow of the PTimeTableBlock.
Definition: PTimeTable.cpp:684
void setNbTimeRow(size_t nbTimeRow)
Sets the nbTimeRow of the PTimeTableBlock.
Definition: PTimeTable.cpp:488
const PLatexObj & getDescription() const
Gets the description of the PTimeTableBlock.
Definition: PTimeTable.cpp:572
void setBeginTime(const PLatexTime &beginTime)
Sets the beginTime of the PTimeTableBlock.
Definition: PTimeTable.cpp:446
void setQuestionTime(const PLatexTime &questionTime)
Sets the questionTime of the PTimeTableBlock.
Definition: PTimeTable.cpp:467
const PString & getStyle() const
Gets the style of the PTimeTableBlock.
Definition: PTimeTable.cpp:670
const PLatexTime & getQuestionTime() const
Gets the questionTime of the PTimeTableBlock.
Definition: PTimeTable.cpp:642
PLatexTime p_endTime
Time when the block ends.
Definition: PTimeTable.h:181
PString p_mainUrl
Url of the main site where this generated timetable is hosted.
Definition: PTimeTable.h:165
const PLatexDate & getDate() const
Gets the date of the PTimeTableBlock.
Definition: PTimeTable.cpp:586
void setMainUrl(const PString &mainUrl)
Sets the mainUrl of the PTimeTableBlock.
Definition: PTimeTable.cpp:397
const PLatexObj & getLocation() const
Gets the location of the PTimeTableBlock.
Definition: PTimeTable.cpp:656
PLatexDate p_date
Date when the block begins.
Definition: PTimeTable.h:177
bool p_isEmptyBlock
True if the block is an empty block.
Definition: PTimeTable.h:193
void setEndTime(const PLatexTime &endTime)
Sets the endTime of the PTimeTableBlock.
Definition: PTimeTable.cpp:453
PTimeTableBlock & operator=(const PTimeTableBlock &other)
Operator = of class PTimeTableBlock.
Definition: PTimeTable.cpp:389
void setDuration(const PLatexTime &duration)
Sets the duration of the PTimeTableBlock.
Definition: PTimeTable.cpp:460
PLatexTime p_beginTime
Time when the block begins.
Definition: PTimeTable.h:179
void setVecSpeaker(const std::vector< PString > &vecSpeaker)
Sets the vecSpeaker of the PTimeTableBlock.
Definition: PTimeTable.cpp:418
PLatexObj p_location
Location of the block.
Definition: PTimeTable.h:187
PLatexObj p_weekTitle
Title of the block for the entire week.
Definition: PTimeTable.h:169
const PLatexTime & getEndTime() const
Gets the endTime of the PTimeTableBlock.
Definition: PTimeTable.cpp:614
void setInvitation(const PString &invitation)
Sets the invitation of the PTimeTableBlock.
Definition: PTimeTable.cpp:425
PString p_style
Style of the section (CSS class name of the section)
Definition: PTimeTable.h:189
void setTitle(const PLatexObj &title)
Sets the title of the PTimeTableBlock.
Definition: PTimeTable.cpp:404
PTimeTableBlock()
Constructor of class PTimeTableBlock.
Definition: PTimeTable.cpp:369
void setStyle(const PString &style)
Sets the style of the PTimeTableBlock.
Definition: PTimeTable.cpp:481
void setIsEmptyBlock(bool isEmptyBlock)
Sets the isEmptyBlock of the PTimeTableBlock.
Definition: PTimeTable.cpp:495
const PString & getInvitation() const
Gets the invitation of the PTimeTableBlock.
Definition: PTimeTable.cpp:558
size_t p_nbTimeRow
Number of time rows on which the current block is.
Definition: PTimeTable.h:191
void setWeekTitle(const PLatexObj &weekTitle)
Sets the weekTitle of the PTimeTableBlock.
Definition: PTimeTable.cpp:411
const PLatexTime & getBeginTime() const
Gets the beginTime of the PTimeTableBlock.
Definition: PTimeTable.cpp:600
const PLatexTime & getDuration() const
Gets the duration of the PTimeTableBlock.
Definition: PTimeTable.cpp:628
PString p_invitation
Name of the invitation file to be generated for this event.
Definition: PTimeTable.h:173
const PString & getMainUrl() const
Gets the mainUrl of the PTimeTableBlock.
Definition: PTimeTable.cpp:502
const PLatexObj & getWeekTitle() const
Gets the weekTitle of the PTimeTableBlock.
Definition: PTimeTable.cpp:530
const std::vector< PString > & getVecSpeaker() const
Gets the vecSpeaker of the PTimeTableBlock.
Definition: PTimeTable.cpp:544
PLatexObj p_title
Title of the block.
Definition: PTimeTable.h:167
void setLocation(const PLatexObj &location)
Sets the location of the PTimeTableBlock.
Definition: PTimeTable.cpp:474
std::vector< PString > p_vecSpeaker
Vector of label of speakers on this block.
Definition: PTimeTable.h:171
Timetable.
Definition: PTimeTable.h:197
PString p_firstDay
Name of the first day of the timetable (Monday, Tuesday, Wednesday, Thrusday, Friday,...
Definition: PTimeTable.h:245
std::vector< PLatexSpeaker > p_vecSpeaker
Vector of speakers.
Definition: PTimeTable.h:251
void copyPTimeTable(const PTimeTable &other)
Copy Function of class PTimeTable.
Definition: PTimeTable.cpp:957
const PLatexDate & getBeginDate() const
Gets the beginDate of the PTimeTable.
Definition: PTimeTable.cpp:873
const PLatexDate & getEndDate() const
Gets the endDate of the PTimeTable.
Definition: PTimeTable.cpp:887
const PLatexObj & getLocation() const
Gets the location of the PTimeTable.
Definition: PTimeTable.cpp:915
PTimeTable & operator=(const PTimeTable &other)
Operator = of class PTimeTable.
Definition: PTimeTable.cpp:760
PLatexObj p_location
Location of the event.
Definition: PTimeTable.h:247
PLatexObj p_name
Name of the event.
Definition: PTimeTable.h:237
const PString & getInvitation() const
Gets the invitation of the PTimeTable.
Definition: PTimeTable.cpp:859
std::vector< PTimeTableBlock > p_vecBlock
Vector of block of the timetable.
Definition: PTimeTable.h:249
const std::vector< PTimeTableBlock > & getVecBlock() const
Gets the vecBlock of the PTimeTable.
Definition: PTimeTable.cpp:929
const PLatexObj & getName() const
Gets the name of the PTimeTable.
Definition: PTimeTable.cpp:845
void setVecSpeaker(const std::vector< PLatexSpeaker > &vecSpeaker)
Sets the vecSpeaker of the PTimeTable.
Definition: PTimeTable.cpp:824
void setInvitation(const PString &invitation)
Sets the invitation of the PTimeTable.
Definition: PTimeTable.cpp:782
const PString & getMainUrl() const
Gets the mainUrl of the PTimeTable.
Definition: PTimeTable.cpp:831
const PString & getFirstDay() const
Gets the firstDay of the PTimeTable.
Definition: PTimeTable.cpp:901
void setBeginDate(const PLatexDate &beginDate)
Sets the beginDate of the PTimeTable.
Definition: PTimeTable.cpp:789
void setLocation(const PLatexObj &location)
Sets the location of the PTimeTable.
Definition: PTimeTable.cpp:810
void setVecBlock(const std::vector< PTimeTableBlock > &vecBlock)
Sets the vecBlock of the PTimeTable.
Definition: PTimeTable.cpp:817
void setName(const PLatexObj &name)
Sets the name of the PTimeTable.
Definition: PTimeTable.cpp:775
PString p_mainUrl
Url of the main site where this generated timetable is hosted.
Definition: PTimeTable.h:235
PString p_invitation
Invitation of the full timetable.
Definition: PTimeTable.h:239
void setEndDate(const PLatexDate &endDate)
Sets the endDate of the PTimeTable.
Definition: PTimeTable.cpp:796
void setFirstDay(const PString &firstDay)
Sets the firstDay of the PTimeTable.
Definition: PTimeTable.cpp:803
virtual ~PTimeTable()
Destructor of class PTimeTable.
Definition: PTimeTable.cpp:752
void setMainUrl(const PString &mainUrl)
Sets the mainUrl of the PTimeTable.
Definition: PTimeTable.cpp:768
PLatexDate p_beginDate
Date when the timetable begins.
Definition: PTimeTable.h:241
PTimeTable()
Constructor of class PTimeTable.
Definition: PTimeTable.cpp:740
void initialisationPTimeTable()
Initialisation Function of class PTimeTable.
Definition: PTimeTable.cpp:970
const std::vector< PLatexSpeaker > & getVecSpeaker() const
Gets the vecSpeaker of the PTimeTable.
Definition: PTimeTable.cpp:943
PLatexDate p_endDate
Date when the timetable ends.
Definition: PTimeTable.h:243