PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
PParseSeq.h
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 
9 //You should not modify this file
10 
11 #ifndef __PPARSESEQ_H__
12 #define __PPARSESEQ_H__
13 
14 #include <vector>
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <string.h>
18 #include <iostream>
19 // #include <inttypes.h>
20 #include "PString.h"
21 
22 #define VERSION_PPARSECMD 0lu
23 #define VERSION_PPARSESTEP 0lu
24 #define VERSION_PPARSESEQ 0lu
25 
26 
27 class PParseCmd;
28 class PParseStep;
29 class PParseSeq;
30 
31 
33 class PParseCmd{
34  public:
35  PParseCmd();
36  PParseCmd(const PParseCmd & other);
37  virtual ~PParseCmd();
38  PParseCmd & operator =(const PParseCmd & other);
39  void setIsMatch(bool isMatch);
40  void setStr(const PString & str);
41  bool getIsMatch() const;
42  bool & getIsMatch();
43  const PString & getStr() const;
44  PString & getStr();
45  private:
47  void copyPParseCmd(const PParseCmd & other);
49  bool p_isMatch;
52 };
53 
55 class PParseStep{
56  public:
57  PParseStep();
58  PParseStep(const PParseStep & other);
59  virtual ~PParseStep();
60  PParseStep & operator =(const PParseStep & other);
61  void setIsOptional(bool isOptional);
62  void setVecCmd(const std ::vector<PParseCmd> & vecCmd);
63  bool getIsOptional() const;
64  bool & getIsOptional();
65  const std ::vector<PParseCmd> & getVecCmd() const;
66  std ::vector<PParseCmd> & getVecCmd();
67  private:
69  void copyPParseStep(const PParseStep & other);
73  std ::vector<PParseCmd> p_vecCmd;
74 };
75 
77 class PParseSeq{
78  public:
79  PParseSeq();
80  PParseSeq(const PParseSeq & other);
81  virtual ~PParseSeq();
82  PParseSeq & operator =(const PParseSeq & other);
83  void setVecStep(const std ::vector<PParseStep> & vecStep);
84  const std ::vector<PParseStep> & getVecStep() const;
85  std ::vector<PParseStep> & getVecStep();
86  private:
88  void copyPParseSeq(const PParseSeq & other);
90  std ::vector<PParseStep> p_vecStep;
91 };
92 
93 
94 
95 
96 
97 #endif
98 
99 
Parser command.
Definition: PParseSeq.h:33
void setIsMatch(bool isMatch)
Set the variable p_isMatch, of type 'bool'.
Definition: PParseSeq.cpp:51
virtual ~PParseCmd()
Destructor of the class PParseCmd.
Definition: PParseSeq.cpp:35
void setStr(const PString &str)
Set the variable p_str, of type 'PString'.
Definition: PParseSeq.cpp:58
bool getIsMatch() const
Get the variable p_isMatch.
Definition: PParseSeq.cpp:65
bool p_isMatch
True to use isMatch function instead of strComposedOf.
Definition: PParseSeq.h:49
void copyPParseCmd(const PParseCmd &other)
Copy function of the class PParseCmd.
Definition: PParseSeq.cpp:107
void initialisationPParseCmd()
Initialisation function of the class PParseCmd.
Definition: PParseSeq.cpp:98
PString p_str
String to be used for the parsing.
Definition: PParseSeq.h:51
const PString & getStr() const
Get the variable p_str.
Definition: PParseSeq.cpp:79
PParseCmd & operator=(const PParseCmd &other)
Equal operator of the class PParseCmd.
Definition: PParseSeq.cpp:43
PParseCmd()
Constructor of the class PParseCmd.
Definition: PParseSeq.cpp:22
Parsing sequence.
Definition: PParseSeq.h:77
PParseSeq & operator=(const PParseSeq &other)
Equal operator of the class PParseSeq.
Definition: PParseSeq.cpp:241
void copyPParseSeq(const PParseSeq &other)
Copy function of the class PParseSeq.
Definition: PParseSeq.cpp:282
PParseSeq()
Constructor of the class PParseSeq.
Definition: PParseSeq.cpp:220
std ::vector< PParseStep > p_vecStep
Vector of all the steps of the parsing sequence.
Definition: PParseSeq.h:90
virtual ~PParseSeq()
Destructor of the class PParseSeq.
Definition: PParseSeq.cpp:233
const std ::vector< PParseStep > & getVecStep() const
Get the variable p_vecStep.
Definition: PParseSeq.cpp:256
void initialisationPParseSeq()
Initialisation function of the class PParseSeq.
Definition: PParseSeq.cpp:275
void setVecStep(const std ::vector< PParseStep > &vecStep)
Set the variable p_vecStep, of type 'std ::vector<PParseStep>'.
Definition: PParseSeq.cpp:249
Describes a parsing step.
Definition: PParseSeq.h:55
void setIsOptional(bool isOptional)
Set the variable p_isOptional, of type 'bool'.
Definition: PParseSeq.cpp:150
PParseStep()
Constructor of the class PParseStep.
Definition: PParseSeq.cpp:121
bool p_isOptional
True if the step is optional (as soon as the previous one or the next one is Ok)
Definition: PParseSeq.h:71
PParseStep & operator=(const PParseStep &other)
Equal operator of the class PParseStep.
Definition: PParseSeq.cpp:142
std ::vector< PParseCmd > p_vecCmd
Vector of command to be used for parsing.
Definition: PParseSeq.h:73
const std ::vector< PParseCmd > & getVecCmd() const
Get the variable p_vecCmd.
Definition: PParseSeq.cpp:178
virtual ~PParseStep()
Destructor of the class PParseStep.
Definition: PParseSeq.cpp:134
void initialisationPParseStep()
Initialisation function of the class PParseStep.
Definition: PParseSeq.cpp:197
void setVecCmd(const std ::vector< PParseCmd > &vecCmd)
Set the variable p_vecCmd, of type 'std ::vector<PParseCmd>'.
Definition: PParseSeq.cpp:157
void copyPParseStep(const PParseStep &other)
Copy function of the class PParseStep.
Definition: PParseSeq.cpp:206
bool getIsOptional() const
Get the variable p_isOptional.
Definition: PParseSeq.cpp:164
Extends the std::string.
Definition: PString.h:16