PhoenixLecture  2.0.0
Set of tools to make lectures
platexobj_updateId.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 
8 #include "platexobj_updateId.h"
9 
11 
14 void platexobj_updateId(PLatexObj & obj, long unsigned int & id){
15  obj.setId(id);
16  ++id;
17  PVecLatexObj & vecContent = obj.getVecContent();
18  if(vecContent.size() != 0lu){
19  for(PVecLatexObj::iterator it(vecContent.begin()); it != vecContent.end(); ++it){
20  platexobj_updateId(*it, id);
21  }
22  }
23 }
24 
26 
29  long unsigned int id(0lu);
30  platexobj_updateId(obj, id);
31 }
32 
33 
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 setId(long unsigned int id)
Sets the id of the PLatexObj.
Definition: PLatexObj.cpp:123
void platexobj_updateId(PLatexObj &obj, long unsigned int &id)
Update the id of the PLatexObj.
std::vector< PLatexObj > PVecLatexObj
Vector of obj.