| 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 "VecValue.h" | ||
| 11 | |||
| 12 | ///Constructor of class VecValue | ||
| 13 |
1/1✓ Branch 0 (3→4) taken 292 times.
|
292 | VecValue::VecValue(){ |
| 14 |
1/1✓ Branch 0 (5→6) taken 292 times.
|
292 | initialisationVecValue(); |
| 15 | 292 | } | |
| 16 | |||
| 17 | ///Copy Constructor of class VecValue | ||
| 18 | /** @param other : VecValue we want ot copy | ||
| 19 | */ | ||
| 20 |
1/1✓ Branch 0 (3→4) taken 624 times.
|
624 | VecValue::VecValue(const VecValue & other){ |
| 21 |
1/1✓ Branch 0 (5→6) taken 624 times.
|
624 | copyVecValue(other); |
| 22 | 624 | } | |
| 23 | |||
| 24 | ///Destructor of class VecValue | ||
| 25 | 916 | VecValue::~VecValue(){ | |
| 26 | |||
| 27 | 916 | } | |
| 28 | |||
| 29 | ///Operator = of class VecValue | ||
| 30 | /** @param other : VecValue we want ot copy | ||
| 31 | * @return copied class VecValue | ||
| 32 | */ | ||
| 33 | ✗ | VecValue & VecValue::operator = (const VecValue & other){ | |
| 34 | ✗ | copyVecValue(other); | |
| 35 | ✗ | return *this; | |
| 36 | } | ||
| 37 | |||
| 38 | ///Sets the value of the VecValue | ||
| 39 | /** @param value : value of the VecValue | ||
| 40 | */ | ||
| 41 | 192 | void VecValue::setValue(const PString & value){ | |
| 42 | 192 | p_value = value; | |
| 43 | 192 | } | |
| 44 | |||
| 45 | ///Sets the key of the VecValue | ||
| 46 | /** @param key : key of the VecValue | ||
| 47 | */ | ||
| 48 | 246 | void VecValue::setKey(const PString & key){ | |
| 49 | 246 | p_key = key; | |
| 50 | 246 | } | |
| 51 | |||
| 52 | ///Sets the vecChild of the VecValue | ||
| 53 | /** @param vecChild : vecChild of the VecValue | ||
| 54 | */ | ||
| 55 | ✗ | void VecValue::setVecChild(const std::vector<VecValue> & vecChild){ | |
| 56 | ✗ | p_vecChild = vecChild; | |
| 57 | ✗ | } | |
| 58 | |||
| 59 | ///Sets the type of the VecValue | ||
| 60 | /** @param type : type of the VecValue | ||
| 61 | */ | ||
| 62 | 330 | void VecValue::setType(const VecValueType::VecValueType & type){ | |
| 63 | 330 | p_type = type; | |
| 64 | 330 | } | |
| 65 | |||
| 66 | ///Sets the indentation of the VecValue | ||
| 67 | /** @param indentation : indentation of the VecValue | ||
| 68 | */ | ||
| 69 | 266 | void VecValue::setIndentation(size_t indentation){ | |
| 70 | 266 | p_indentation = indentation; | |
| 71 | 266 | } | |
| 72 | |||
| 73 | ///Gets the value of the VecValue | ||
| 74 | /** @return value of the VecValue | ||
| 75 | */ | ||
| 76 | 192 | const PString & VecValue::getValue() const{ | |
| 77 | 192 | return p_value; | |
| 78 | } | ||
| 79 | |||
| 80 | ///Gets the value of the VecValue | ||
| 81 | /** @return value of the VecValue | ||
| 82 | */ | ||
| 83 | ✗ | PString & VecValue::getValue(){ | |
| 84 | ✗ | return p_value; | |
| 85 | } | ||
| 86 | |||
| 87 | ///Gets the key of the VecValue | ||
| 88 | /** @return key of the VecValue | ||
| 89 | */ | ||
| 90 | 322 | const PString & VecValue::getKey() const{ | |
| 91 | 322 | return p_key; | |
| 92 | } | ||
| 93 | |||
| 94 | ///Gets the key of the VecValue | ||
| 95 | /** @return key of the VecValue | ||
| 96 | */ | ||
| 97 | ✗ | PString & VecValue::getKey(){ | |
| 98 | ✗ | return p_key; | |
| 99 | } | ||
| 100 | |||
| 101 | ///Gets the vecChild of the VecValue | ||
| 102 | /** @return vecChild of the VecValue | ||
| 103 | */ | ||
| 104 | 292 | const std::vector<VecValue> & VecValue::getVecChild() const{ | |
| 105 | 292 | return p_vecChild; | |
| 106 | } | ||
| 107 | |||
| 108 | ///Gets the vecChild of the VecValue | ||
| 109 | /** @return vecChild of the VecValue | ||
| 110 | */ | ||
| 111 | 1176 | std::vector<VecValue> & VecValue::getVecChild(){ | |
| 112 | 1176 | return p_vecChild; | |
| 113 | } | ||
| 114 | |||
| 115 | ///Gets the type of the VecValue | ||
| 116 | /** @return type of the VecValue | ||
| 117 | */ | ||
| 118 | 82 | const VecValueType::VecValueType & VecValue::getType() const{ | |
| 119 | 82 | return p_type; | |
| 120 | } | ||
| 121 | |||
| 122 | ///Gets the type of the VecValue | ||
| 123 | /** @return type of the VecValue | ||
| 124 | */ | ||
| 125 | 184 | VecValueType::VecValueType & VecValue::getType(){ | |
| 126 | 184 | return p_type; | |
| 127 | } | ||
| 128 | |||
| 129 | ///Gets the indentation of the VecValue | ||
| 130 | /** @return indentation of the VecValue | ||
| 131 | */ | ||
| 132 | 58 | size_t VecValue::getIndentation() const{ | |
| 133 | 58 | return p_indentation; | |
| 134 | } | ||
| 135 | |||
| 136 | ///Gets the indentation of the VecValue | ||
| 137 | /** @return indentation of the VecValue | ||
| 138 | */ | ||
| 139 | 82 | size_t & VecValue::getIndentation(){ | |
| 140 | 82 | return p_indentation; | |
| 141 | } | ||
| 142 | |||
| 143 | ///Copy Function of class VecValue | ||
| 144 | /** @param other : VecValue we want ot copy | ||
| 145 | */ | ||
| 146 | 624 | void VecValue::copyVecValue(const VecValue & other){ | |
| 147 | 624 | p_value = other.p_value; | |
| 148 | 624 | p_key = other.p_key; | |
| 149 | 624 | p_vecChild = other.p_vecChild; | |
| 150 | 624 | p_type = other.p_type; | |
| 151 | 624 | p_indentation = other.p_indentation; | |
| 152 | 624 | } | |
| 153 | |||
| 154 | ///Initialisation Function of class VecValue | ||
| 155 | 292 | void VecValue::initialisationVecValue(){ | |
| 156 | 292 | p_value = ""; | |
| 157 | 292 | p_key = ""; | |
| 158 | 292 | p_indentation = 0lu; | |
| 159 | 292 | } | |
| 160 | |||
| 161 |