16 return phoenix_load_value_from_config<PString>(dico, attributeName,
"").
eraseFirstLastChar(
"\"'\t\n ");
31 std::cerr <<
"ptimetable_parseLatexAttribute : cannot parse value of attribute '"<<attributeName<<
"'" << std::endl;
44 if(mapSpeaker == NULL){
return true;}
46 for(VecDicoValue::const_iterator it(vecSpeaker.begin()); it != vecSpeaker.end(); ++it){
50 std::cerr <<
"ptimetable_loadSpeaker : missing 'name'" << std::endl;
54 std::cerr <<
"ptimetable_loadSpeaker : missing 'function' in speaker '"<<name<<
"'" << std::endl;
57 std::cerr <<
"ptimetable_loadSpeaker : missing 'affiliation' in speaker '"<<name<<
"'" << std::endl;
60 std::cerr <<
"ptimetable_loadSpeaker : missing 'description' in speaker '"<<name<<
"'" << std::endl;
64 vecOutputSpeaker.push_back(speaker);
76 if(vecValue.size() >= 1lu){
77 date.
setDay(atol(vecValue[0lu].c_str()));
79 if(vecValue.size() >= 2lu){
80 date.
setMonth(atol(vecValue[1lu].c_str()));
82 if(vecValue.size() >= 3lu){
83 date.
setYear(atol(vecValue[2lu].c_str()));
96 if(vecValue.size() == 1lu){
97 duration.
setMinute(atol(vecValue[0lu].c_str()));
98 }
else if(vecValue.size() == 2lu){
99 duration.
setHour(atol(vecValue[0lu].c_str()));
100 duration.
setMinute(atol(vecValue[1lu].c_str()));
112 if(mapBlock == NULL){
return true;}
114 for(VecDicoValue::const_iterator it(vecBlock.begin()); it != vecBlock.end(); ++it){
143 std::cerr <<
"ptimetable_loadSpeaker : cannot load toml file '"<<configFile<<
"'" << std::endl;
147 std::cerr <<
"ptimetable_loadSpeaker : cannot load speakers from file '"<<configFile<<
"'" << std::endl;
161 std::cerr <<
"ptimetable_load : cannot load toml file '"<<configFile<<
"'" << std::endl;
165 std::cerr <<
"ptimetable_load : cannot load speakers from file '"<<configFile<<
"'" << std::endl;
170 if(dicoTimetable != NULL){
172 std::cerr <<
"ptimetable_load : missing 'name' of the event" << std::endl;
175 std::cerr <<
"ptimetable_load : missing 'location' of the event" << std::endl;
183 std::cerr <<
"ptimetable_load : cannot load blocks from file '"<<configFile<<
"'" << std::endl;
std::vector< DicoValue > VecDicoValue
Vector of DicoValue.
void eraseFirstLastChar(PVecString &vecOut, const PVecString &vecStr, const PString &vecChar)
Erase first and last characters of all PString in given vector.
std::vector< PString > PVecString
const std::vector< DicoValue > & getVecChild() const
Gets the vecChild of the DicoValue.
const DicoValue * getMap(const PString &key) const
Get a DicoValue in the map of the current one.
void setMonth(size_t month)
Sets the month of the PLatexDate.
void setYear(size_t year)
Sets the year of the PLatexDate.
void setDay(size_t day)
Sets the day of the PLatexDate.
Describe a speaker in a timetable.
void setLabel(const PString &label)
Sets the label of the PLatexSpeaker.
const PLatexObj & getTitle() const
Gets the title of the PLatexSpeaker.
const PLatexObj & getName() const
Gets the name of the PLatexSpeaker.
const PLatexObj & getAffiliation() const
Gets the affiliation of the PLatexSpeaker.
const PLatexObj & getDescription() const
Gets the description of the PLatexSpeaker.
const PLatexObj & getJob() const
Gets the job of the PLatexSpeaker.
void setMinute(size_t minute)
Sets the minute of the PLatexTime.
void setHour(size_t hour)
Sets the hour of the PLatexTime.
Path of a directory or a file.
std::vector< PString > split(char separator) const
Cut a PString on the given separator char.
PString eraseFirstLastChar(const PString &vecChar) const
Erase first and last char in a string.
bool parser_toml(DicoValue &dico, const PPath &fileName)
bool platexobj_parseStr(PLatexObj &obj, const PString &latexStr)
Parse a str and convert it into a PLatexObj.
bool ptimetable_parseLatexAttribute(PLatexObj &obj, const DicoValue &value, const PString &attributeName)
Parse an attribute in PLatexObj.
bool ptimetable_load(PTimeTable &timetable, const PPath &configFile)
Load the PTimeTable with a toml configuration.
PString ptimetable_loadString(const DicoValue &dico, const PString &attributeName)
Load a string value.
bool ptimetable_loadSpeaker(std::vector< PLatexSpeaker > &vecOutputSpeaker, const DicoValue &dico)
Load the speakers of the PTimeTable.
bool ptimetable_loadBlock(PTimeTable &timetable, const DicoValue &dico)
Load the blocks of the PTimeTable.
PLatexTime ptimetable_parsePLatexTime(const PString &str)
Load a PLatexTime with a string.
PLatexDate ptimetable_parsePLatexDate(const PString &str)
Load a PLatexDate with a string.