1 |
|
|
/*************************************** |
2 |
|
|
Auteur : Pierre Aubert |
3 |
|
|
Mail : pierre.aubert@lapp.in2p3.fr |
4 |
|
|
Licence : CeCILL-C |
5 |
|
|
****************************************/ |
6 |
|
|
|
7 |
|
|
|
8 |
|
|
#include "VecValue.h" |
9 |
|
|
|
10 |
|
|
///Constructor of class VecValue |
11 |
|
234 |
VecValue::VecValue(){ |
12 |
|
|
|
13 |
|
234 |
} |
14 |
|
|
|
15 |
|
|
///Copy Constructor of class VecValue |
16 |
|
|
/** @param other : VecValue we want ot copy |
17 |
|
|
*/ |
18 |
|
507 |
VecValue::VecValue(const VecValue & other){ |
19 |
✓ |
507 |
copyVecValue(other); |
20 |
|
507 |
} |
21 |
|
|
|
22 |
|
|
///Destructor of class VecValue |
23 |
|
1482 |
VecValue::~VecValue(){ |
24 |
|
|
|
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
///Operator = of class VecValue |
28 |
|
|
/** @param other : VecValue we want ot copy |
29 |
|
|
* @return copied class VecValue |
30 |
|
|
*/ |
31 |
|
|
VecValue & VecValue::operator = (const VecValue & other){ |
32 |
|
|
copyVecValue(other); |
33 |
|
|
return *this; |
34 |
|
|
} |
35 |
|
|
|
36 |
|
|
///Sets the value of the VecValue |
37 |
|
|
/** @param value : value of the VecValue |
38 |
|
|
*/ |
39 |
|
165 |
void VecValue::setValue(const std::string & value){ |
40 |
|
165 |
p_value = value; |
41 |
|
165 |
} |
42 |
|
|
|
43 |
|
|
///Sets the key of the VecValue |
44 |
|
|
/** @param key : key of the VecValue |
45 |
|
|
*/ |
46 |
|
197 |
void VecValue::setKey(const std::string & key){ |
47 |
|
197 |
p_key = key; |
48 |
|
197 |
} |
49 |
|
|
|
50 |
|
|
///Sets the vecChild of the VecValue |
51 |
|
|
/** @param vecChild : vecChild of the VecValue |
52 |
|
|
*/ |
53 |
|
|
void VecValue::setVecChild(const std::vector<VecValue> & vecChild){ |
54 |
|
|
p_vecChild = vecChild; |
55 |
|
|
} |
56 |
|
|
|
57 |
|
|
///Gets the value of the VecValue |
58 |
|
|
/** @return value of the VecValue |
59 |
|
|
*/ |
60 |
|
165 |
const std::string & VecValue::getValue() const{ |
61 |
|
165 |
return p_value; |
62 |
|
|
} |
63 |
|
|
|
64 |
|
|
///Gets the value of the VecValue |
65 |
|
|
/** @return value of the VecValue |
66 |
|
|
*/ |
67 |
|
|
std::string & VecValue::getValue(){ |
68 |
|
|
return p_value; |
69 |
|
|
} |
70 |
|
|
|
71 |
|
|
///Gets the key of the VecValue |
72 |
|
|
/** @return key of the VecValue |
73 |
|
|
*/ |
74 |
|
281 |
const std::string & VecValue::getKey() const{ |
75 |
|
281 |
return p_key; |
76 |
|
|
} |
77 |
|
|
|
78 |
|
|
///Gets the key of the VecValue |
79 |
|
|
/** @return key of the VecValue |
80 |
|
|
*/ |
81 |
|
|
std::string & VecValue::getKey(){ |
82 |
|
|
return p_key; |
83 |
|
|
} |
84 |
|
|
|
85 |
|
|
///Gets the vecChild of the VecValue |
86 |
|
|
/** @return vecChild of the VecValue |
87 |
|
|
*/ |
88 |
|
234 |
const std::vector<VecValue> & VecValue::getVecChild() const{ |
89 |
|
234 |
return p_vecChild; |
90 |
|
|
} |
91 |
|
|
|
92 |
|
|
///Gets the vecChild of the VecValue |
93 |
|
|
/** @return vecChild of the VecValue |
94 |
|
|
*/ |
95 |
|
762 |
std::vector<VecValue> & VecValue::getVecChild(){ |
96 |
|
762 |
return p_vecChild; |
97 |
|
|
} |
98 |
|
|
|
99 |
|
|
///Copy Function of class VecValue |
100 |
|
|
/** @param other : VecValue we want ot copy |
101 |
|
|
*/ |
102 |
|
507 |
void VecValue::copyVecValue(const VecValue & other){ |
103 |
|
507 |
p_value = other.p_value; |
104 |
|
507 |
p_key = other.p_key; |
105 |
|
507 |
p_vecChild = other.p_vecChild; |
106 |
|
507 |
} |
107 |
|
|
|