PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
parse_generic_string.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 "parse_generic_string.h"
8 
10 
15  if(parser.isMatch("\"\"\"")){
16  str = "\"\"\"" + parser.getUntilKey("\"\"\"");
17  }else if(parser.isMatch("\"")){
18  str = "\"" + parser.getUntilKey("\"");
19  }else if(parser.isMatch("'''")){
20  str = "'''" + parser.getUntilKey("'''");
21  }else if(parser.isMatch("'")){
22  str = "'" + parser.getUntilKey("'");
23  }else{
24  return false;
25  }
26  return true;
27 }
28 
29 
30 
classe qui permet de parser des fichiers texte en renvoyant les tokens les uns après les autres
Definition: PFileParser.h:20
bool isMatch(const PString &patern)
Says if the patern match with the current caracters of the PFileParser.
PString getUntilKey(const PString &patern)
Renvoie la chaine de caractère du caractère courant jusqu'à patern comprise.
Extends the std::string.
Definition: PString.h:16
bool parse_generic_string(PString &str, PFileParser &parser)
Parse string value.