PhoenixLecture  2.0.0
Set of tools to make lectures
platexobj_create.cpp
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 #include "platexobj_create.h"
8 
10 
13  PLatexObj obj;
15  return obj;
16 }
17 
19 
24 PLatexObj platexobj_createSection(PLatexType::PLatexType sectionType, const PLatexObj & complexTitle, const PString & label){
25  PLatexObj sec;
26  sec.setType(sectionType);
27  if(complexTitle.getType() == PLatexType::NONE){
28  sec.setComplexTitle(complexTitle.getVecContent());
29  }else{
30  std::vector<PLatexObj> vecContent;
31  vecContent.push_back(complexTitle);
32  sec.setComplexTitle(vecContent);
33  }
34  sec.setLabelName(label);
35  return sec;
36 }
37 
39 
42  PLatexObj obj;
44  return obj;
45 }
46 
48 
52 PLatexObj platexobj_createText(const PString & text, const PString & label){
53  PLatexObj obj;
55  obj.setText(text);
56  obj.setLabelName(label);
57  return obj;
58 }
59 
61 
65 PLatexObj platexobj_createTextBf(const PString & text, const PString & label){
66  PLatexObj obj;
68  obj.setName(text);
69  obj.setLabelName(label);
70  return obj;
71 }
72 
74 
78 PLatexObj platexobj_createParagraph(const PString & text, const PString & label){
79  return platexobj_createParagraph(platexobj_createText(text, ""), label);
80 }
81 
83 
87 PLatexObj platexobj_createParagraph(const PLatexObj & objText, const PString & label){
88  PLatexObj obj;
90  appendVecContent(obj.getVecContent(), objText);
91  obj.setLabelName(label);
92  return obj;
93 }
94 
96 
100 PLatexObj platexobj_createRef(const PString & label, const PString & text){
101  return platexobj_createRef(label, platexobj_createText(text, ""));
102 }
103 
105 
109 PLatexObj platexobj_createRef(const PString & label, const PLatexObj & textObj){
110  PLatexObj obj;
112  obj.setName(label);
113  appendVecContent(obj.getVecContent(), textObj);
114  return obj;
115 }
116 
118 
121  PLatexObj obj;
123  return obj;
124 }
125 
127 
131  PLatexObj out;
133  appendVecContent(out.getVecContent(), obj);
134  return out;
135 }
136 
138 
141 PLatexObj platexobj_createItem(const std::vector<PLatexObj> & vecObj){
142  PLatexObj obj;
144  appendVecContent(obj.getVecContent(), vecObj);
145  return obj;
146 }
147 
149 
152  PLatexObj obj;
154  return obj;
155 }
156 
158 
162  PLatexObj cell;
164  cell.setText(blockStyle);
165  return cell;
166 }
167 
169 
174  PLatexObj cell(platexobj_createTimetableBlock(blockStyle));
175  appendVecContent(cell.getVecContent(), obj);
176  return cell;
177 }
178 
180 
184 PLatexObj platexobj_createTimetableBlock(const PString & blockStyle, const std::vector<PLatexObj> & vecObj){
185  PLatexObj cell(platexobj_createTimetableBlock(blockStyle));
186  appendVecContent(cell.getVecContent(), vecObj);
187  return cell;
188 }
189 
191 
195  PLatexObj obj;
197  obj.setText(fileNameIcs);
198  return obj;
199 }
200 
201 
Describe a latex object.
Definition: PLatexObj.h:40
const std::vector< PLatexObj > & getVecContent() const
Gets the vecContent of the PLatexObj.
Definition: PLatexObj.cpp:410
void setLabelName(const PString &labelName)
Sets the labelName of the PLatexObj.
Definition: PLatexObj.cpp:158
void setComplexTitle(const std::vector< PLatexObj > &complexTitle)
Sets the complexTitle of the PLatexObj.
Definition: PLatexObj.cpp:179
const PLatexType::PLatexType & getType() const
Gets the type of the PLatexObj.
Definition: PLatexObj.cpp:298
void setName(const PString &name)
Sets the name of the PLatexObj.
Definition: PLatexObj.cpp:144
void setType(const PLatexType::PLatexType &type)
Sets the type of the PLatexObj.
Definition: PLatexObj.cpp:130
void setText(const PString &text)
Sets the text of the PLatexObj.
Definition: PLatexObj.cpp:137
Path of a directory or a file.
Definition: PPath.h:17
Extends the std::string.
Definition: PString.h:16
PLatexType
Type of the PLatexObj.
Definition: PLatexType.h:12
@ TIMETABLE_TIMEROW
Definition: PLatexType.h:100
@ TIMETABLE_BLOCK
Definition: PLatexType.h:102
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 appendVecContent(std::vector< PLatexObj > &vecContent, const std::vector< PLatexObj > &vecObj)
Append a vector of PLatexObj in the given vector of content.