| 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 | 7 | PParseCmd::PParseCmd(){ | |
| 23 |
1/1✓ Branch 0 (3→4) taken 7 times.
|
7 | initialisationPParseCmd(); |
| 24 | 7 | } | |
| 25 | |||
| 26 | ///Copy constructor of the class PParseCmd | ||
| 27 | /** @param other : other variable | ||
| 28 | */ | ||
| 29 | 20 | PParseCmd::PParseCmd(const PParseCmd & other){ | |
| 30 |
1/1✓ Branch 0 (3→4) taken 20 times.
|
20 | initialisationPParseCmd(); |
| 31 |
1/1✓ Branch 0 (4→5) taken 20 times.
|
20 | copyPParseCmd(other); |
| 32 | 20 | } | |
| 33 | |||
| 34 | ///Destructor of the class PParseCmd | ||
| 35 | 27 | PParseCmd::~PParseCmd(){ | |
| 36 | |||
| 37 | 27 | } | |
| 38 | |||
| 39 | ///Equal operator of the class PParseCmd | ||
| 40 | /** @param other : other variable | ||
| 41 | * @return copied @brief Parser command | ||
| 42 | */ | ||
| 43 | ✗ | PParseCmd & PParseCmd::operator =(const PParseCmd & other){ | |
| 44 | ✗ | copyPParseCmd(other); | |
| 45 | ✗ | 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 | 7 | void PParseCmd::setIsMatch(bool isMatch){ | |
| 52 | 7 | p_isMatch = isMatch; | |
| 53 | 7 | } | |
| 54 | |||
| 55 | ///Set the variable p_str, of type 'PString' | ||
| 56 | /** @param str : String to be used for the parsing | ||
| 57 | */ | ||
| 58 | 7 | void PParseCmd::setStr(const PString & str){ | |
| 59 | 7 | p_str = str; | |
| 60 | 7 | } | |
| 61 | |||
| 62 | ///Get the variable p_isMatch | ||
| 63 | /** @return True to use isMatch function instead of strComposedOf | ||
| 64 | */ | ||
| 65 | 5 | bool PParseCmd::getIsMatch() const{ | |
| 66 | 5 | return p_isMatch; | |
| 67 | } | ||
| 68 | |||
| 69 | ///Get the variable p_isMatch | ||
| 70 | /** @return True to use isMatch function instead of strComposedOf | ||
| 71 | */ | ||
| 72 | ✗ | bool & PParseCmd::getIsMatch(){ | |
| 73 | ✗ | return p_isMatch; | |
| 74 | } | ||
| 75 | |||
| 76 | ///Get the variable p_str | ||
| 77 | /** @return String to be used for the parsing | ||
| 78 | */ | ||
| 79 | 5 | const PString & PParseCmd::getStr() const{ | |
| 80 | 5 | return p_str; | |
| 81 | } | ||
| 82 | |||
| 83 | ///Get the variable p_str | ||
| 84 | /** @return String to be used for the parsing | ||
| 85 | */ | ||
| 86 | ✗ | PString & PParseCmd::getStr(){ | |
| 87 | ✗ | 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 | 27 | void PParseCmd::initialisationPParseCmd(){ | |
| 99 | ///True to use isMatch function instead of strComposedOf | ||
| 100 | 27 | p_isMatch = 0; | |
| 101 | |||
| 102 | 27 | } | |
| 103 | |||
| 104 | ///Copy function of the class PParseCmd | ||
| 105 | /** @param other : other variable | ||
| 106 | */ | ||
| 107 | 20 | void PParseCmd::copyPParseCmd(const PParseCmd & other){ | |
| 108 | 20 | p_isMatch = other.p_isMatch; | |
| 109 | 20 | p_str = other.p_str; | |
| 110 | |||
| 111 | 20 | } | |
| 112 | |||
| 113 | /*********************************************************************** | ||
| 114 | * * | ||
| 115 | * Public functions of class PParseStep * | ||
| 116 | * * | ||
| 117 | ************************************************************************/ | ||
| 118 | |||
| 119 | |||
| 120 | ///Constructor of the class PParseStep | ||
| 121 | 5 | PParseStep::PParseStep(){ | |
| 122 |
1/1✓ Branch 0 (3→4) taken 5 times.
|
5 | initialisationPParseStep(); |
| 123 | 5 | } | |
| 124 | |||
| 125 | ///Copy constructor of the class PParseStep | ||
| 126 | /** @param other : other variable | ||
| 127 | */ | ||
| 128 | 8 | PParseStep::PParseStep(const PParseStep & other){ | |
| 129 |
1/1✓ Branch 0 (3→4) taken 8 times.
|
8 | initialisationPParseStep(); |
| 130 |
1/1✓ Branch 0 (4→5) taken 8 times.
|
8 | copyPParseStep(other); |
| 131 | 8 | } | |
| 132 | |||
| 133 | ///Destructor of the class PParseStep | ||
| 134 | 13 | PParseStep::~PParseStep(){ | |
| 135 | |||
| 136 | 13 | } | |
| 137 | |||
| 138 | ///Equal operator of the class PParseStep | ||
| 139 | /** @param other : other variable | ||
| 140 | * @return copied @brief Describes a parsing step | ||
| 141 | */ | ||
| 142 | ✗ | PParseStep & PParseStep::operator =(const PParseStep & other){ | |
| 143 | ✗ | copyPParseStep(other); | |
| 144 | ✗ | 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 | 5 | void PParseStep::setIsOptional(bool isOptional){ | |
| 151 | 5 | p_isOptional = isOptional; | |
| 152 | 5 | } | |
| 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 | ✗ | void PParseStep::setVecCmd(const std ::vector<PParseCmd> & vecCmd){ | |
| 158 | ✗ | p_vecCmd = vecCmd; | |
| 159 | ✗ | } | |
| 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 | 5 | bool PParseStep::getIsOptional() const{ | |
| 165 | 5 | 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 | ✗ | bool & PParseStep::getIsOptional(){ | |
| 172 | ✗ | return p_isOptional; | |
| 173 | } | ||
| 174 | |||
| 175 | ///Get the variable p_vecCmd | ||
| 176 | /** @return Vector of command to be used for parsing | ||
| 177 | */ | ||
| 178 | 5 | const std ::vector<PParseCmd> & PParseStep::getVecCmd() const{ | |
| 179 | 5 | return p_vecCmd; | |
| 180 | } | ||
| 181 | |||
| 182 | ///Get the variable p_vecCmd | ||
| 183 | /** @return Vector of command to be used for parsing | ||
| 184 | */ | ||
| 185 | 7 | std ::vector<PParseCmd> & PParseStep::getVecCmd(){ | |
| 186 | 7 | 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 | 13 | void PParseStep::initialisationPParseStep(){ | |
| 198 | ///True if the step is optional (as soon as the previous one or the next one is Ok) | ||
| 199 | 13 | p_isOptional = 0; | |
| 200 | |||
| 201 | 13 | } | |
| 202 | |||
| 203 | ///Copy function of the class PParseStep | ||
| 204 | /** @param other : other variable | ||
| 205 | */ | ||
| 206 | 8 | void PParseStep::copyPParseStep(const PParseStep & other){ | |
| 207 | 8 | p_isOptional = other.p_isOptional; | |
| 208 | 8 | p_vecCmd = other.p_vecCmd; | |
| 209 | |||
| 210 | 8 | } | |
| 211 | |||
| 212 | /*********************************************************************** | ||
| 213 | * * | ||
| 214 | * Public functions of class PParseSeq * | ||
| 215 | * * | ||
| 216 | ************************************************************************/ | ||
| 217 | |||
| 218 | |||
| 219 | ///Constructor of the class PParseSeq | ||
| 220 | 2 | PParseSeq::PParseSeq(){ | |
| 221 |
1/1✓ Branch 0 (3→4) taken 2 times.
|
2 | initialisationPParseSeq(); |
| 222 | 2 | } | |
| 223 | |||
| 224 | ///Copy constructor of the class PParseSeq | ||
| 225 | /** @param other : other variable | ||
| 226 | */ | ||
| 227 | ✗ | PParseSeq::PParseSeq(const PParseSeq & other){ | |
| 228 | ✗ | initialisationPParseSeq(); | |
| 229 | ✗ | copyPParseSeq(other); | |
| 230 | ✗ | } | |
| 231 | |||
| 232 | ///Destructor of the class PParseSeq | ||
| 233 | 2 | PParseSeq::~PParseSeq(){ | |
| 234 | |||
| 235 | 2 | } | |
| 236 | |||
| 237 | ///Equal operator of the class PParseSeq | ||
| 238 | /** @param other : other variable | ||
| 239 | * @return copied @brief Parsing sequence | ||
| 240 | */ | ||
| 241 | ✗ | PParseSeq & PParseSeq::operator =(const PParseSeq & other){ | |
| 242 | ✗ | copyPParseSeq(other); | |
| 243 | ✗ | 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 | ✗ | void PParseSeq::setVecStep(const std ::vector<PParseStep> & vecStep){ | |
| 250 | ✗ | p_vecStep = vecStep; | |
| 251 | ✗ | } | |
| 252 | |||
| 253 | ///Get the variable p_vecStep | ||
| 254 | /** @return Vector of all the steps of the parsing sequence | ||
| 255 | */ | ||
| 256 | 2 | const std ::vector<PParseStep> & PParseSeq::getVecStep() const{ | |
| 257 | 2 | return p_vecStep; | |
| 258 | } | ||
| 259 | |||
| 260 | ///Get the variable p_vecStep | ||
| 261 | /** @return Vector of all the steps of the parsing sequence | ||
| 262 | */ | ||
| 263 | 5 | std ::vector<PParseStep> & PParseSeq::getVecStep(){ | |
| 264 | 5 | 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 | 2 | void PParseSeq::initialisationPParseSeq(){ | |
| 276 | |||
| 277 | 2 | } | |
| 278 | |||
| 279 | ///Copy function of the class PParseSeq | ||
| 280 | /** @param other : other variable | ||
| 281 | */ | ||
| 282 | ✗ | void PParseSeq::copyPParseSeq(const PParseSeq & other){ | |
| 283 | ✗ | p_vecStep = other.p_vecStep; | |
| 284 | |||
| 285 | ✗ | } | |
| 286 | |||
| 287 | |||
| 288 | |||
| 289 |