| 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 | |||
| 10 | #include "AbtractField.h" | ||
| 11 | |||
| 12 | ///Constructor of class AbtractField | ||
| 13 | 51 | AbtractField::AbtractField(){ | |
| 14 |
1/1✓ Branch 0 (3→4) taken 51 times.
|
51 | initialisationAbtractField(); |
| 15 | 51 | } | |
| 16 | |||
| 17 | ///Copy Constructor of class AbtractField | ||
| 18 | /** @param other : AbtractField we want ot copy | ||
| 19 | */ | ||
| 20 | 1 | AbtractField::AbtractField(const AbtractField & other){ | |
| 21 |
1/1✓ Branch 0 (3→4) taken 1 times.
|
1 | copyAbtractField(other); |
| 22 | 1 | } | |
| 23 | |||
| 24 | ///Destructor of class AbtractField | ||
| 25 | 52 | AbtractField::~AbtractField(){ | |
| 26 | |||
| 27 | 52 | } | |
| 28 | |||
| 29 | ///Operator = of class AbtractField | ||
| 30 | /** @param other : AbtractField we want ot copy | ||
| 31 | * @return copied class AbtractField | ||
| 32 | */ | ||
| 33 | 1 | AbtractField & AbtractField::operator = (const AbtractField & other){ | |
| 34 | 1 | copyAbtractField(other); | |
| 35 | 1 | return *this; | |
| 36 | } | ||
| 37 | |||
| 38 | ///Sets the name of the AbtractField | ||
| 39 | /** @param name : name of the AbtractField | ||
| 40 | */ | ||
| 41 | 45 | void AbtractField::setName(const PString & name){ | |
| 42 | 45 | p_name = name; | |
| 43 | 45 | } | |
| 44 | |||
| 45 | ///Sets the id of the AbtractField | ||
| 46 | /** @param id : id of the AbtractField | ||
| 47 | */ | ||
| 48 | 45 | void AbtractField::setId(size_t id){ | |
| 49 | 45 | p_id = id; | |
| 50 | 45 | } | |
| 51 | |||
| 52 | ///Sets the type of the AbtractField | ||
| 53 | /** @param type : type of the AbtractField | ||
| 54 | */ | ||
| 55 | 45 | void AbtractField::setType(const FieldType::FieldType & type){ | |
| 56 | 45 | p_type = type; | |
| 57 | 45 | } | |
| 58 | |||
| 59 | ///Sets the typeSize of the AbtractField | ||
| 60 | /** @param typeSize : typeSize of the AbtractField | ||
| 61 | */ | ||
| 62 | 37 | void AbtractField::setTypeSize(size_t typeSize){ | |
| 63 | 37 | p_typeSize = typeSize; | |
| 64 | 37 | } | |
| 65 | |||
| 66 | ///Sets the isArray of the AbtractField | ||
| 67 | /** @param isArray : isArray of the AbtractField | ||
| 68 | */ | ||
| 69 | 37 | void AbtractField::setIsArray(bool isArray){ | |
| 70 | 37 | p_isArray = isArray; | |
| 71 | 37 | } | |
| 72 | |||
| 73 | ///Sets the nbElement of the AbtractField | ||
| 74 | /** @param nbElement : nbElement of the AbtractField | ||
| 75 | */ | ||
| 76 | 41 | void AbtractField::setNbElement(size_t * nbElement){ | |
| 77 | 41 | p_nbElement = nbElement; | |
| 78 | 41 | } | |
| 79 | |||
| 80 | ///Sets the varPtr of the AbtractField | ||
| 81 | /** @param varPtr : varPtr of the AbtractField | ||
| 82 | */ | ||
| 83 | 33 | void AbtractField::setVarPtr(void * varPtr){ | |
| 84 | 33 | p_varPtr = varPtr; | |
| 85 | 33 | } | |
| 86 | |||
| 87 | ///Sets the arrayPtr of the AbtractField | ||
| 88 | /** @param arrayPtr : arrayPtr of the AbtractField | ||
| 89 | */ | ||
| 90 | 5 | void AbtractField::setArrayPtr(void ** arrayPtr){ | |
| 91 | 5 | p_arrayPtr = arrayPtr; | |
| 92 | 5 | } | |
| 93 | |||
| 94 | ///Sets the isOffsetReady of the AbtractField | ||
| 95 | /** @param isOffsetReady : isOffsetReady of the AbtractField | ||
| 96 | */ | ||
| 97 | 134 | void AbtractField::setIsOffsetReady(bool isOffsetReady){ | |
| 98 | 134 | p_isOffsetReady = isOffsetReady; | |
| 99 | 134 | } | |
| 100 | |||
| 101 | ///Sets the offset of the AbtractField | ||
| 102 | /** @param offset : offset of the AbtractField | ||
| 103 | */ | ||
| 104 | 109 | void AbtractField::setOffset(size_t offset){ | |
| 105 | 109 | p_offset = offset; | |
| 106 | 109 | } | |
| 107 | |||
| 108 | ///Gets the name of the AbtractField | ||
| 109 | /** @return name of the AbtractField | ||
| 110 | */ | ||
| 111 | 236 | const PString & AbtractField::getName() const{ | |
| 112 | 236 | return p_name; | |
| 113 | } | ||
| 114 | |||
| 115 | ///Gets the name of the AbtractField | ||
| 116 | /** @return name of the AbtractField | ||
| 117 | */ | ||
| 118 | 2 | PString & AbtractField::getName(){ | |
| 119 | 2 | return p_name; | |
| 120 | } | ||
| 121 | |||
| 122 | ///Gets the id of the AbtractField | ||
| 123 | /** @return id of the AbtractField | ||
| 124 | */ | ||
| 125 | 152 | size_t AbtractField::getId() const{ | |
| 126 | 152 | return p_id; | |
| 127 | } | ||
| 128 | |||
| 129 | ///Gets the id of the AbtractField | ||
| 130 | /** @return id of the AbtractField | ||
| 131 | */ | ||
| 132 | 46 | size_t & AbtractField::getId(){ | |
| 133 | 46 | return p_id; | |
| 134 | } | ||
| 135 | |||
| 136 | ///Gets the type of the AbtractField | ||
| 137 | /** @return type of the AbtractField | ||
| 138 | */ | ||
| 139 | 2 | const FieldType::FieldType & AbtractField::getType() const{ | |
| 140 | 2 | return p_type; | |
| 141 | } | ||
| 142 | |||
| 143 | ///Gets the type of the AbtractField | ||
| 144 | /** @return type of the AbtractField | ||
| 145 | */ | ||
| 146 | 302 | FieldType::FieldType & AbtractField::getType(){ | |
| 147 | 302 | return p_type; | |
| 148 | } | ||
| 149 | |||
| 150 | ///Gets the typeSize of the AbtractField | ||
| 151 | /** @return typeSize of the AbtractField | ||
| 152 | */ | ||
| 153 | 2 | size_t AbtractField::getTypeSize() const{ | |
| 154 | 2 | return p_typeSize; | |
| 155 | } | ||
| 156 | |||
| 157 | ///Gets the typeSize of the AbtractField | ||
| 158 | /** @return typeSize of the AbtractField | ||
| 159 | */ | ||
| 160 | 303 | size_t & AbtractField::getTypeSize(){ | |
| 161 | 303 | return p_typeSize; | |
| 162 | } | ||
| 163 | |||
| 164 | ///Gets the isArray of the AbtractField | ||
| 165 | /** @return isArray of the AbtractField | ||
| 166 | */ | ||
| 167 | 97 | bool AbtractField::getIsArray() const{ | |
| 168 | 97 | return p_isArray; | |
| 169 | } | ||
| 170 | |||
| 171 | ///Gets the isArray of the AbtractField | ||
| 172 | /** @return isArray of the AbtractField | ||
| 173 | */ | ||
| 174 | 326 | bool & AbtractField::getIsArray(){ | |
| 175 | 326 | return p_isArray; | |
| 176 | } | ||
| 177 | |||
| 178 | ///Gets the nbElement of the AbtractField | ||
| 179 | /** @return nbElement of the AbtractField | ||
| 180 | */ | ||
| 181 | 13 | size_t * AbtractField::getNbElement() const{ | |
| 182 | 13 | return p_nbElement; | |
| 183 | } | ||
| 184 | |||
| 185 | ///Gets the nbElement of the AbtractField | ||
| 186 | /** @return nbElement of the AbtractField | ||
| 187 | */ | ||
| 188 | 6 | size_t * & AbtractField::getNbElement(){ | |
| 189 | 6 | return p_nbElement; | |
| 190 | } | ||
| 191 | |||
| 192 | ///Gets the varPtr of the AbtractField | ||
| 193 | /** @return varPtr of the AbtractField | ||
| 194 | */ | ||
| 195 | 86 | void * AbtractField::getVarPtr() const{ | |
| 196 | 86 | return p_varPtr; | |
| 197 | } | ||
| 198 | |||
| 199 | ///Gets the varPtr of the AbtractField | ||
| 200 | /** @return varPtr of the AbtractField | ||
| 201 | */ | ||
| 202 | 322 | void * & AbtractField::getVarPtr(){ | |
| 203 | 322 | return p_varPtr; | |
| 204 | } | ||
| 205 | |||
| 206 | ///Gets the arrayPtr of the AbtractField | ||
| 207 | /** @return arrayPtr of the AbtractField | ||
| 208 | */ | ||
| 209 | 13 | void ** AbtractField::getArrayPtr() const{ | |
| 210 | 13 | return p_arrayPtr; | |
| 211 | } | ||
| 212 | |||
| 213 | ///Gets the arrayPtr of the AbtractField | ||
| 214 | /** @return arrayPtr of the AbtractField | ||
| 215 | */ | ||
| 216 | 42 | void ** & AbtractField::getArrayPtr(){ | |
| 217 | 42 | return p_arrayPtr; | |
| 218 | } | ||
| 219 | |||
| 220 | ///Gets the isOffsetReady of the AbtractField | ||
| 221 | /** @return isOffsetReady of the AbtractField | ||
| 222 | */ | ||
| 223 | 119 | bool AbtractField::getIsOffsetReady() const{ | |
| 224 | 119 | return p_isOffsetReady; | |
| 225 | } | ||
| 226 | |||
| 227 | ///Gets the isOffsetReady of the AbtractField | ||
| 228 | /** @return isOffsetReady of the AbtractField | ||
| 229 | */ | ||
| 230 | 52 | bool & AbtractField::getIsOffsetReady(){ | |
| 231 | 52 | return p_isOffsetReady; | |
| 232 | } | ||
| 233 | |||
| 234 | ///Gets the offset of the AbtractField | ||
| 235 | /** @return offset of the AbtractField | ||
| 236 | */ | ||
| 237 | 44 | size_t AbtractField::getOffset() const{ | |
| 238 | 44 | return p_offset; | |
| 239 | } | ||
| 240 | |||
| 241 | ///Gets the offset of the AbtractField | ||
| 242 | /** @return offset of the AbtractField | ||
| 243 | */ | ||
| 244 | 326 | size_t & AbtractField::getOffset(){ | |
| 245 | 326 | return p_offset; | |
| 246 | } | ||
| 247 | |||
| 248 | ///Copy Function of class AbtractField | ||
| 249 | /** @param other : AbtractField we want ot copy | ||
| 250 | */ | ||
| 251 | 2 | void AbtractField::copyAbtractField(const AbtractField & other){ | |
| 252 | 2 | p_name = other.p_name; | |
| 253 | 2 | p_id = other.p_id; | |
| 254 | 2 | p_type = other.p_type; | |
| 255 | 2 | p_typeSize = other.p_typeSize; | |
| 256 | 2 | p_isArray = other.p_isArray; | |
| 257 | 2 | p_nbElement = other.p_nbElement; | |
| 258 | 2 | p_varPtr = other.p_varPtr; | |
| 259 | 2 | p_arrayPtr = other.p_arrayPtr; | |
| 260 | 2 | p_isOffsetReady = other.p_isOffsetReady; | |
| 261 | 2 | p_offset = other.p_offset; | |
| 262 | 2 | } | |
| 263 | |||
| 264 | ///Initialisation Function of class AbtractField | ||
| 265 | 51 | void AbtractField::initialisationAbtractField(){ | |
| 266 | 51 | p_name = ""; | |
| 267 | 51 | p_id = 0lu; | |
| 268 | 51 | p_typeSize = 0lu; | |
| 269 | 51 | p_isArray = false; | |
| 270 | 51 | p_nbElement = NULL; | |
| 271 | 51 | p_varPtr = NULL; | |
| 272 | 51 | p_arrayPtr = NULL; | |
| 273 | 51 | p_isOffsetReady = false; | |
| 274 | 51 | p_offset = 0lu; | |
| 275 | 51 | } | |
| 276 | |||
| 277 | ///Constructor of class FieldConfig | ||
| 278 | 39 | FieldConfig::FieldConfig(){ | |
| 279 |
1/1✓ Branch 0 (4→5) taken 39 times.
|
39 | initialisationFieldConfig(); |
| 280 | 39 | } | |
| 281 | |||
| 282 | ///Copy Constructor of class FieldConfig | ||
| 283 | /** @param other : FieldConfig we want ot copy | ||
| 284 | */ | ||
| 285 | 18 | FieldConfig::FieldConfig(const FieldConfig & other){ | |
| 286 |
1/1✓ Branch 0 (4→5) taken 18 times.
|
18 | copyFieldConfig(other); |
| 287 | 18 | } | |
| 288 | |||
| 289 | ///Destructor of class FieldConfig | ||
| 290 | 57 | FieldConfig::~FieldConfig(){ | |
| 291 | |||
| 292 | 57 | } | |
| 293 | |||
| 294 | ///Operator = of class FieldConfig | ||
| 295 | /** @param other : FieldConfig we want ot copy | ||
| 296 | * @return copied class FieldConfig | ||
| 297 | */ | ||
| 298 | 13 | FieldConfig & FieldConfig::operator = (const FieldConfig & other){ | |
| 299 | 13 | copyFieldConfig(other); | |
| 300 | 13 | return *this; | |
| 301 | } | ||
| 302 | |||
| 303 | ///Sets the name of the FieldConfig | ||
| 304 | /** @param name : name of the FieldConfig | ||
| 305 | */ | ||
| 306 | 24 | void FieldConfig::setName(const PString & name){ | |
| 307 | 24 | p_name = name; | |
| 308 | 24 | } | |
| 309 | |||
| 310 | ///Sets the id of the FieldConfig | ||
| 311 | /** @param id : id of the FieldConfig | ||
| 312 | */ | ||
| 313 | 24 | void FieldConfig::setId(size_t id){ | |
| 314 | 24 | p_id = id; | |
| 315 | 24 | } | |
| 316 | |||
| 317 | ///Sets the type of the FieldConfig | ||
| 318 | /** @param type : type of the FieldConfig | ||
| 319 | */ | ||
| 320 | 24 | void FieldConfig::setType(const FieldType::FieldType & type){ | |
| 321 | 24 | p_type = type; | |
| 322 | 24 | } | |
| 323 | |||
| 324 | ///Sets the isArray of the FieldConfig | ||
| 325 | /** @param isArray : isArray of the FieldConfig | ||
| 326 | */ | ||
| 327 | 24 | void FieldConfig::setIsArray(bool isArray){ | |
| 328 | 24 | p_isArray = isArray; | |
| 329 | 24 | } | |
| 330 | |||
| 331 | ///Sets the vecChildren of the FieldConfig | ||
| 332 | /** @param vecChildren : vecChildren of the FieldConfig | ||
| 333 | */ | ||
| 334 | ✗ | void FieldConfig::setVecChildren(const std::map<PString, FieldConfig> & vecChildren){ | |
| 335 | ✗ | p_vecChildren = vecChildren; | |
| 336 | ✗ | } | |
| 337 | |||
| 338 | ///Gets the name of the FieldConfig | ||
| 339 | /** @return name of the FieldConfig | ||
| 340 | */ | ||
| 341 | 24 | const PString & FieldConfig::getName() const{ | |
| 342 | 24 | return p_name; | |
| 343 | } | ||
| 344 | |||
| 345 | ///Gets the name of the FieldConfig | ||
| 346 | /** @return name of the FieldConfig | ||
| 347 | */ | ||
| 348 | 2 | PString & FieldConfig::getName(){ | |
| 349 | 2 | return p_name; | |
| 350 | } | ||
| 351 | |||
| 352 | ///Gets the id of the FieldConfig | ||
| 353 | /** @return id of the FieldConfig | ||
| 354 | */ | ||
| 355 | 24 | size_t FieldConfig::getId() const{ | |
| 356 | 24 | return p_id; | |
| 357 | } | ||
| 358 | |||
| 359 | ///Gets the id of the FieldConfig | ||
| 360 | /** @return id of the FieldConfig | ||
| 361 | */ | ||
| 362 | 2 | size_t & FieldConfig::getId(){ | |
| 363 | 2 | return p_id; | |
| 364 | } | ||
| 365 | |||
| 366 | ///Gets the type of the FieldConfig | ||
| 367 | /** @return type of the FieldConfig | ||
| 368 | */ | ||
| 369 | 24 | const FieldType::FieldType & FieldConfig::getType() const{ | |
| 370 | 24 | return p_type; | |
| 371 | } | ||
| 372 | |||
| 373 | ///Gets the type of the FieldConfig | ||
| 374 | /** @return type of the FieldConfig | ||
| 375 | */ | ||
| 376 | 2 | FieldType::FieldType & FieldConfig::getType(){ | |
| 377 | 2 | return p_type; | |
| 378 | } | ||
| 379 | |||
| 380 | ///Gets the isArray of the FieldConfig | ||
| 381 | /** @return isArray of the FieldConfig | ||
| 382 | */ | ||
| 383 | 4 | bool FieldConfig::getIsArray() const{ | |
| 384 | 4 | return p_isArray; | |
| 385 | } | ||
| 386 | |||
| 387 | ///Gets the isArray of the FieldConfig | ||
| 388 | /** @return isArray of the FieldConfig | ||
| 389 | */ | ||
| 390 | 2 | bool & FieldConfig::getIsArray(){ | |
| 391 | 2 | return p_isArray; | |
| 392 | } | ||
| 393 | |||
| 394 | ///Gets the vecChildren of the FieldConfig | ||
| 395 | /** @return vecChildren of the FieldConfig | ||
| 396 | */ | ||
| 397 | 10 | const std::map<PString, FieldConfig> & FieldConfig::getVecChildren() const{ | |
| 398 | 10 | return p_vecChildren; | |
| 399 | } | ||
| 400 | |||
| 401 | ///Gets the vecChildren of the FieldConfig | ||
| 402 | /** @return vecChildren of the FieldConfig | ||
| 403 | */ | ||
| 404 | 12 | std::map<PString, FieldConfig> & FieldConfig::getVecChildren(){ | |
| 405 | 12 | return p_vecChildren; | |
| 406 | } | ||
| 407 | |||
| 408 | ///Copy Function of class FieldConfig | ||
| 409 | /** @param other : FieldConfig we want ot copy | ||
| 410 | */ | ||
| 411 | 31 | void FieldConfig::copyFieldConfig(const FieldConfig & other){ | |
| 412 | 31 | p_name = other.p_name; | |
| 413 | 31 | p_id = other.p_id; | |
| 414 | 31 | p_type = other.p_type; | |
| 415 | 31 | p_isArray = other.p_isArray; | |
| 416 | 31 | p_vecChildren = other.p_vecChildren; | |
| 417 | 31 | } | |
| 418 | |||
| 419 | ///Initialisation Function of class FieldConfig | ||
| 420 | 39 | void FieldConfig::initialisationFieldConfig(){ | |
| 421 | 39 | p_name = ""; | |
| 422 | 39 | p_id = 0lu; | |
| 423 | 39 | p_isArray = false; | |
| 424 | 39 | } | |
| 425 | |||
| 426 |