PhoenixLecture  2.0.0
Set of tools to make lectures
platexobj_rawtext.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_html.h"
8 #include "platexobj_rawtext.h"
9 
10 
12 
17  PString body("");
18  body += platexobj_rawtext(obj.getVecContent());
19  return body;
20 }
21 
23 
26 PString platexobj_rawtext(const std::vector<PLatexObj> & vecObj){
27  PString body("");
28  for(std::vector<PLatexObj>::const_iterator it(vecObj.begin()); it != vecObj.end(); ++it){
29  body += platexobj_rawtext(*it);
30  }
31  return body;
32 }
33 
35 
39  PString body("");
40  PLatexType::PLatexType type(obj.getType());
41  if(type == PLatexType::TEXT){body = platexobj_htmlStrText(obj);}
42  else if(type == PLatexType::URL){body = platexobj_htmlStrUrl(obj);}
43  else if(type == PLatexType::PERCENT){body += "%";}
44 
45  else if(type == PLatexType::REF){body = platexobj_htmlStrRef(obj);}
46  else if(type == PLatexType::HREF){body = platexobj_rawtextContent(obj);}
47  else if(type == PLatexType::TEXTBF){body = platexobj_rawtextContent(obj);}
48  else if(type == PLatexType::TEXTIT){body = platexobj_rawtextContent(obj);}
49  else if(type == PLatexType::DEBUG){body = platexobj_htmlStrTextDebug(obj);}
50  else if(type == PLatexType::FUNCTION){body = platexobj_rawtextContent(obj);}
51  else if(type == PLatexType::RENDEZVOUS){body = platexobj_htmlStrRendezVous(obj);}
52  else{
53  body = platexobj_rawtext(obj.getVecContent());
54  }
55  return body;
56 }
57 
58 
59 
60 
61 
Describe a latex object.
Definition: PLatexObj.h:40
const std::vector< PLatexObj > & getVecContent() const
Gets the vecContent of the PLatexObj.
Definition: PLatexObj.cpp:410
const PLatexType::PLatexType & getType() const
Gets the type of the PLatexObj.
Definition: PLatexObj.cpp:298
Extends the std::string.
Definition: PString.h:16
PLatexType
Type of the PLatexObj.
Definition: PLatexType.h:12
PString platexobj_htmlStrUrl(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_htmlStrTextDebug(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_htmlStrRendezVous(const PLatexObj &obj)
Convert a rendez-vous into a html string.
PString platexobj_htmlStrText(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_htmlStrRef(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_rawtext(const std::vector< PLatexObj > &vecObj)
Convert a PLatexObj in text.
PString platexobj_rawtextContent(const PLatexObj &obj)
Convert a PLatexObj into a raw text string.