Directory: | ./ |
---|---|
File: | tmp_project/PhoenixPresentation/tmp_project/PhoenixInkscape/tmp_project/PhoenixFileParser/src/PParseSeq.cpp |
Date: | 2025-03-24 18:12:43 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 87 | 87 | 100.0% |
Branches: | 9 | 9 | 100.0% |
Line | Branch | Exec | Source |
---|---|---|---|
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 | #include "PParseSeq.h" | ||
12 | |||
13 | |||
14 | /*********************************************************************** | ||
15 | * * | ||
16 | * Public functions of class PParseCmd * | ||
17 | * * | ||
18 | ************************************************************************/ | ||
19 | |||
20 | |||
21 | ///Constructor of the class PParseCmd | ||
22 | 345619 | PParseCmd::PParseCmd(){ | |
23 |
1/1✓ Branch 1 taken 345619 times.
|
345619 | initialisationPParseCmd(); |
24 | 345619 | } | |
25 | |||
26 | ///Copy constructor of the class PParseCmd | ||
27 | /** @param other : other variable | ||
28 | */ | ||
29 | 866843 | PParseCmd::PParseCmd(const PParseCmd & other){ | |
30 |
1/1✓ Branch 1 taken 866843 times.
|
866843 | initialisationPParseCmd(); |
31 |
1/1✓ Branch 1 taken 866843 times.
|
866843 | copyPParseCmd(other); |
32 | 866843 | } | |
33 | |||
34 | ///Destructor of the class PParseCmd | ||
35 | 2424924 | PParseCmd::~PParseCmd(){ | |
36 | |||
37 | } | ||
38 | |||
39 | ///Equal operator of the class PParseCmd | ||
40 | /** @param other : other variable | ||
41 | * @return copied @brief Parser command | ||
42 | */ | ||
43 | 316 | PParseCmd & PParseCmd::operator =(const PParseCmd & other){ | |
44 | 316 | copyPParseCmd(other); | |
45 | 316 | return *this; | |
46 | } | ||
47 | |||
48 | ///Set the variable p_isMatch, of type 'bool' | ||
49 | /** @param isMatch : True to use isMatch function instead of strComposedOf | ||
50 | */ | ||
51 | 345617 | void PParseCmd::setIsMatch(bool isMatch){ | |
52 | 345617 | p_isMatch = isMatch; | |
53 | 345617 | } | |
54 | |||
55 | ///Set the variable p_str, of type 'PString' | ||
56 | /** @param str : String to be used for the parsing | ||
57 | */ | ||
58 | 345617 | void PParseCmd::setStr(const PString & str){ | |
59 | 345617 | p_str = str; | |
60 | 345617 | } | |
61 | |||
62 | ///Get the variable p_isMatch | ||
63 | /** @return True to use isMatch function instead of strComposedOf | ||
64 | */ | ||
65 | 23521 | bool PParseCmd::getIsMatch() const{ | |
66 | 23521 | return p_isMatch; | |
67 | } | ||
68 | |||
69 | ///Get the variable p_isMatch | ||
70 | /** @return True to use isMatch function instead of strComposedOf | ||
71 | */ | ||
72 | 1 | bool & PParseCmd::getIsMatch(){ | |
73 | 1 | return p_isMatch; | |
74 | } | ||
75 | |||
76 | ///Get the variable p_str | ||
77 | /** @return String to be used for the parsing | ||
78 | */ | ||
79 | 23521 | const PString & PParseCmd::getStr() const{ | |
80 | 23521 | return p_str; | |
81 | } | ||
82 | |||
83 | ///Get the variable p_str | ||
84 | /** @return String to be used for the parsing | ||
85 | */ | ||
86 | 1 | PString & PParseCmd::getStr(){ | |
87 | 1 | return p_str; | |
88 | } | ||
89 | |||
90 | /*********************************************************************** | ||
91 | * * | ||
92 | * Private functions of class PParseCmd * | ||
93 | * * | ||
94 | ************************************************************************/ | ||
95 | |||
96 | |||
97 | ///Initialisation function of the class PParseCmd | ||
98 | 1212462 | void PParseCmd::initialisationPParseCmd(){ | |
99 | ///True to use isMatch function instead of strComposedOf | ||
100 | 1212462 | p_isMatch = 0; | |
101 | |||
102 | 1212462 | } | |
103 | |||
104 | ///Copy function of the class PParseCmd | ||
105 | /** @param other : other variable | ||
106 | */ | ||
107 | 867159 | void PParseCmd::copyPParseCmd(const PParseCmd & other){ | |
108 | 867159 | p_isMatch = other.p_isMatch; | |
109 | 867159 | p_str = other.p_str; | |
110 | |||
111 | 867159 | } | |
112 | |||
113 | /*********************************************************************** | ||
114 | * * | ||
115 | * Public functions of class PParseStep * | ||
116 | * * | ||
117 | ************************************************************************/ | ||
118 | |||
119 | |||
120 | ///Constructor of the class PParseStep | ||
121 | 115212 | PParseStep::PParseStep(){ | |
122 |
1/1✓ Branch 1 taken 115212 times.
|
115212 | initialisationPParseStep(); |
123 | 115212 | } | |
124 | |||
125 | ///Copy constructor of the class PParseStep | ||
126 | /** @param other : other variable | ||
127 | */ | ||
128 | 751625 | PParseStep::PParseStep(const PParseStep & other){ | |
129 |
1/1✓ Branch 1 taken 751625 times.
|
751625 | initialisationPParseStep(); |
130 |
1/1✓ Branch 1 taken 751625 times.
|
751625 | copyPParseStep(other); |
131 | 751625 | } | |
132 | |||
133 | ///Destructor of the class PParseStep | ||
134 | 1733674 | PParseStep::~PParseStep(){ | |
135 | |||
136 | } | ||
137 | |||
138 | ///Equal operator of the class PParseStep | ||
139 | /** @param other : other variable | ||
140 | * @return copied @brief Describes a parsing step | ||
141 | */ | ||
142 | 315 | PParseStep & PParseStep::operator =(const PParseStep & other){ | |
143 | 315 | copyPParseStep(other); | |
144 | 315 | return *this; | |
145 | } | ||
146 | |||
147 | ///Set the variable p_isOptional, of type 'bool' | ||
148 | /** @param isOptional : True if the step is optional (as soon as the previous one or the next one is Ok) | ||
149 | */ | ||
150 | 21954 | void PParseStep::setIsOptional(bool isOptional){ | |
151 | 21954 | p_isOptional = isOptional; | |
152 | 21954 | } | |
153 | |||
154 | ///Set the variable p_vecCmd, of type 'std ::vector<PParseCmd>' | ||
155 | /** @param vecCmd : Vector of command to be used for parsing | ||
156 | */ | ||
157 | 1 | void PParseStep::setVecCmd(const std ::vector<PParseCmd> & vecCmd){ | |
158 | 1 | p_vecCmd = vecCmd; | |
159 | 1 | } | |
160 | |||
161 | ///Get the variable p_isOptional | ||
162 | /** @return True if the step is optional (as soon as the previous one or the next one is Ok) | ||
163 | */ | ||
164 | 23521 | bool PParseStep::getIsOptional() const{ | |
165 | 23521 | return p_isOptional; | |
166 | } | ||
167 | |||
168 | ///Get the variable p_isOptional | ||
169 | /** @return True if the step is optional (as soon as the previous one or the next one is Ok) | ||
170 | */ | ||
171 | 1 | bool & PParseStep::getIsOptional(){ | |
172 | 1 | return p_isOptional; | |
173 | } | ||
174 | |||
175 | ///Get the variable p_vecCmd | ||
176 | /** @return Vector of command to be used for parsing | ||
177 | */ | ||
178 | 23521 | const std ::vector<PParseCmd> & PParseStep::getVecCmd() const{ | |
179 | 23521 | return p_vecCmd; | |
180 | } | ||
181 | |||
182 | ///Get the variable p_vecCmd | ||
183 | /** @return Vector of command to be used for parsing | ||
184 | */ | ||
185 | 115213 | std ::vector<PParseCmd> & PParseStep::getVecCmd(){ | |
186 | 115213 | return p_vecCmd; | |
187 | } | ||
188 | |||
189 | /*********************************************************************** | ||
190 | * * | ||
191 | * Private functions of class PParseStep * | ||
192 | * * | ||
193 | ************************************************************************/ | ||
194 | |||
195 | |||
196 | ///Initialisation function of the class PParseStep | ||
197 | 866837 | void PParseStep::initialisationPParseStep(){ | |
198 | ///True if the step is optional (as soon as the previous one or the next one is Ok) | ||
199 | 866837 | p_isOptional = 0; | |
200 | |||
201 | 866837 | } | |
202 | |||
203 | ///Copy function of the class PParseStep | ||
204 | /** @param other : other variable | ||
205 | */ | ||
206 | 751940 | void PParseStep::copyPParseStep(const PParseStep & other){ | |
207 | 751940 | p_isOptional = other.p_isOptional; | |
208 | 751940 | p_vecCmd = other.p_vecCmd; | |
209 | |||
210 | 751940 | } | |
211 | |||
212 | /*********************************************************************** | ||
213 | * * | ||
214 | * Public functions of class PParseSeq * | ||
215 | * * | ||
216 | ************************************************************************/ | ||
217 | |||
218 | |||
219 | ///Constructor of the class PParseSeq | ||
220 | 1867018 | PParseSeq::PParseSeq(){ | |
221 |
1/1✓ Branch 1 taken 1867018 times.
|
1867018 | initialisationPParseSeq(); |
222 | 1867018 | } | |
223 | |||
224 | ///Copy constructor of the class PParseSeq | ||
225 | /** @param other : other variable | ||
226 | */ | ||
227 | 1 | PParseSeq::PParseSeq(const PParseSeq & other){ | |
228 |
1/1✓ Branch 1 taken 1 times.
|
1 | initialisationPParseSeq(); |
229 |
1/1✓ Branch 1 taken 1 times.
|
1 | copyPParseSeq(other); |
230 | 1 | } | |
231 | |||
232 | ///Destructor of the class PParseSeq | ||
233 | 3734038 | PParseSeq::~PParseSeq(){ | |
234 | |||
235 | } | ||
236 | |||
237 | ///Equal operator of the class PParseSeq | ||
238 | /** @param other : other variable | ||
239 | * @return copied @brief Parsing sequence | ||
240 | */ | ||
241 | 1550841 | PParseSeq & PParseSeq::operator =(const PParseSeq & other){ | |
242 | 1550841 | copyPParseSeq(other); | |
243 | 1550841 | return *this; | |
244 | } | ||
245 | |||
246 | ///Set the variable p_vecStep, of type 'std ::vector<PParseStep>' | ||
247 | /** @param vecStep : Vector of all the steps of the parsing sequence | ||
248 | */ | ||
249 | 1 | void PParseSeq::setVecStep(const std ::vector<PParseStep> & vecStep){ | |
250 | 1 | p_vecStep = vecStep; | |
251 | 1 | } | |
252 | |||
253 | ///Get the variable p_vecStep | ||
254 | /** @return Vector of all the steps of the parsing sequence | ||
255 | */ | ||
256 | 510913 | const std ::vector<PParseStep> & PParseSeq::getVecStep() const{ | |
257 | 510913 | return p_vecStep; | |
258 | } | ||
259 | |||
260 | ///Get the variable p_vecStep | ||
261 | /** @return Vector of all the steps of the parsing sequence | ||
262 | */ | ||
263 | 115211 | std ::vector<PParseStep> & PParseSeq::getVecStep(){ | |
264 | 115211 | return p_vecStep; | |
265 | } | ||
266 | |||
267 | /*********************************************************************** | ||
268 | * * | ||
269 | * Private functions of class PParseSeq * | ||
270 | * * | ||
271 | ************************************************************************/ | ||
272 | |||
273 | |||
274 | ///Initialisation function of the class PParseSeq | ||
275 | 1867019 | void PParseSeq::initialisationPParseSeq(){ | |
276 | |||
277 | 1867019 | } | |
278 | |||
279 | ///Copy function of the class PParseSeq | ||
280 | /** @param other : other variable | ||
281 | */ | ||
282 | 1550842 | void PParseSeq::copyPParseSeq(const PParseSeq & other){ | |
283 | 1550842 | p_vecStep = other.p_vecStep; | |
284 | |||
285 | 1550842 | } | |
286 | |||
287 | |||
288 | |||
289 |