Directory: | ./ |
---|---|
File: | src/Representation/Representation.cpp |
Date: | 2025-03-14 12:18:05 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 126 | 249 | 50.6% |
Branches: | 11 | 51 | 21.6% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | /*************************************** | ||
2 | Auteur : Pierre Aubert | ||
3 | Mail : pierre.aubert@lapp.in2p3.fr | ||
4 | Licence : CeCILL-C | ||
5 | ****************************************/ | ||
6 | |||
7 | |||
8 | #include "Representation.h" | ||
9 | |||
10 | ///Get the name of the class Data | ||
11 | /** @return name of the class Data | ||
12 | */ | ||
13 | template<> | ||
14 | ✗ | std::string phoenix_getTypeName<Data >(){ | |
15 | ✗ | return "Data"; | |
16 | } | ||
17 | |||
18 | ///Constructor of class Data | ||
19 |
2/2✓ Branch 2 taken 30 times.
✓ Branch 5 taken 30 times.
|
30 | Data::Data(){ |
20 |
1/1✓ Branch 1 taken 30 times.
|
30 | initialisationData(); |
21 | 30 | } | |
22 | |||
23 | ///Copy Constructor of class Data | ||
24 | /** @param other : Data we want ot copy | ||
25 | */ | ||
26 | ✗ | Data::Data(const Data & other){ | |
27 | ✗ | copyData(other); | |
28 | } | ||
29 | |||
30 | ///Destructor of class Data | ||
31 | 60 | Data::~Data(){ | |
32 | |||
33 | } | ||
34 | |||
35 | ///Operator = of class Data | ||
36 | /** @param other : Data we want ot copy | ||
37 | * @return copied class Data | ||
38 | */ | ||
39 | 3 | Data & Data::operator = (const Data & other){ | |
40 | 3 | copyData(other); | |
41 | 3 | return *this; | |
42 | } | ||
43 | |||
44 | ///Sets the name of the Data | ||
45 | /** @param name : name of the Data | ||
46 | */ | ||
47 | ✗ | void Data::setName(const PString & name){ | |
48 | ✗ | p_name = name; | |
49 | } | ||
50 | |||
51 | ///Sets the description of the Data | ||
52 | /** @param description : description of the Data | ||
53 | */ | ||
54 | ✗ | void Data::setDescription(const PString & description){ | |
55 | ✗ | p_description = description; | |
56 | } | ||
57 | |||
58 | ///Sets the type of the Data | ||
59 | /** @param type : type of the Data | ||
60 | */ | ||
61 | 9 | void Data::setType(const PString & type){ | |
62 | 9 | p_type = type; | |
63 | 9 | } | |
64 | |||
65 | ///Sets the value of the Data | ||
66 | /** @param value : value of the Data | ||
67 | */ | ||
68 | ✗ | void Data::setValue(const DataStreamMsg & value){ | |
69 | ✗ | p_value = value; | |
70 | } | ||
71 | |||
72 | ///Gets the name of the Data | ||
73 | /** @return name of the Data | ||
74 | */ | ||
75 | ✗ | const PString & Data::getName() const{ | |
76 | ✗ | return p_name; | |
77 | } | ||
78 | |||
79 | ///Gets the name of the Data | ||
80 | /** @return name of the Data | ||
81 | */ | ||
82 | ✗ | PString & Data::getName(){ | |
83 | ✗ | return p_name; | |
84 | } | ||
85 | |||
86 | ///Gets the description of the Data | ||
87 | /** @return description of the Data | ||
88 | */ | ||
89 | ✗ | const PString & Data::getDescription() const{ | |
90 | ✗ | return p_description; | |
91 | } | ||
92 | |||
93 | ///Gets the description of the Data | ||
94 | /** @return description of the Data | ||
95 | */ | ||
96 | ✗ | PString & Data::getDescription(){ | |
97 | ✗ | return p_description; | |
98 | } | ||
99 | |||
100 | ///Gets the type of the Data | ||
101 | /** @return type of the Data | ||
102 | */ | ||
103 | 10 | const PString & Data::getType() const{ | |
104 | 10 | return p_type; | |
105 | } | ||
106 | |||
107 | ///Gets the type of the Data | ||
108 | /** @return type of the Data | ||
109 | */ | ||
110 | ✗ | PString & Data::getType(){ | |
111 | ✗ | return p_type; | |
112 | } | ||
113 | |||
114 | ///Gets the value of the Data | ||
115 | /** @return value of the Data | ||
116 | */ | ||
117 | 8 | const DataStreamMsg & Data::getValue() const{ | |
118 | 8 | return p_value; | |
119 | } | ||
120 | |||
121 | ///Gets the value of the Data | ||
122 | /** @return value of the Data | ||
123 | */ | ||
124 | 18 | DataStreamMsg & Data::getValue(){ | |
125 | 18 | return p_value; | |
126 | } | ||
127 | |||
128 | ///Copy Function of class Data | ||
129 | /** @param other : Data we want ot copy | ||
130 | */ | ||
131 | 3 | void Data::copyData(const Data & other){ | |
132 | 3 | p_name = other.p_name; | |
133 | 3 | p_description = other.p_description; | |
134 | 3 | p_type = other.p_type; | |
135 | 3 | p_value = other.p_value; | |
136 | 3 | } | |
137 | |||
138 | ///Initialisation Function of class Data | ||
139 | 30 | void Data::initialisationData(){ | |
140 | 30 | p_name = ""; | |
141 | 30 | p_description = ""; | |
142 | 30 | p_type = ""; | |
143 | 30 | } | |
144 | |||
145 | ///Get the name of the class Function | ||
146 | /** @return name of the class Function | ||
147 | */ | ||
148 | template<> | ||
149 | ✗ | std::string phoenix_getTypeName<Function >(){ | |
150 | ✗ | return "Function"; | |
151 | } | ||
152 | |||
153 | ///Constructor of class Function | ||
154 | ✗ | Function::Function(){ | |
155 | ✗ | initialisationFunction(); | |
156 | } | ||
157 | |||
158 | ///Copy Constructor of class Function | ||
159 | /** @param other : Function we want ot copy | ||
160 | */ | ||
161 | ✗ | Function::Function(const Function & other){ | |
162 | ✗ | copyFunction(other); | |
163 | } | ||
164 | |||
165 | ///Destructor of class Function | ||
166 | ✗ | Function::~Function(){ | |
167 | |||
168 | } | ||
169 | |||
170 | ///Operator = of class Function | ||
171 | /** @param other : Function we want ot copy | ||
172 | * @return copied class Function | ||
173 | */ | ||
174 | ✗ | Function & Function::operator = (const Function & other){ | |
175 | ✗ | copyFunction(other); | |
176 | ✗ | return *this; | |
177 | } | ||
178 | |||
179 | ///Sets the name of the Function | ||
180 | /** @param name : name of the Function | ||
181 | */ | ||
182 | ✗ | void Function::setName(const PString & name){ | |
183 | ✗ | p_name = name; | |
184 | } | ||
185 | |||
186 | ///Sets the description of the Function | ||
187 | /** @param description : description of the Function | ||
188 | */ | ||
189 | ✗ | void Function::setDescription(const PString & description){ | |
190 | ✗ | p_description = description; | |
191 | } | ||
192 | |||
193 | ///Sets the vecParam of the Function | ||
194 | /** @param vecParam : vecParam of the Function | ||
195 | */ | ||
196 | ✗ | void Function::setVecParam(const std::vector<Data> & vecParam){ | |
197 | ✗ | p_vecParam = vecParam; | |
198 | } | ||
199 | |||
200 | ///Sets the returnValue of the Function | ||
201 | /** @param returnValue : returnValue of the Function | ||
202 | */ | ||
203 | ✗ | void Function::setReturnValue(const Data & returnValue){ | |
204 | ✗ | p_returnValue = returnValue; | |
205 | } | ||
206 | |||
207 | ///Gets the name of the Function | ||
208 | /** @return name of the Function | ||
209 | */ | ||
210 | ✗ | const PString & Function::getName() const{ | |
211 | ✗ | return p_name; | |
212 | } | ||
213 | |||
214 | ///Gets the name of the Function | ||
215 | /** @return name of the Function | ||
216 | */ | ||
217 | ✗ | PString & Function::getName(){ | |
218 | ✗ | return p_name; | |
219 | } | ||
220 | |||
221 | ///Gets the description of the Function | ||
222 | /** @return description of the Function | ||
223 | */ | ||
224 | ✗ | const PString & Function::getDescription() const{ | |
225 | ✗ | return p_description; | |
226 | } | ||
227 | |||
228 | ///Gets the description of the Function | ||
229 | /** @return description of the Function | ||
230 | */ | ||
231 | ✗ | PString & Function::getDescription(){ | |
232 | ✗ | return p_description; | |
233 | } | ||
234 | |||
235 | ///Gets the vecParam of the Function | ||
236 | /** @return vecParam of the Function | ||
237 | */ | ||
238 | ✗ | const std::vector<Data> & Function::getVecParam() const{ | |
239 | ✗ | return p_vecParam; | |
240 | } | ||
241 | |||
242 | ///Gets the vecParam of the Function | ||
243 | /** @return vecParam of the Function | ||
244 | */ | ||
245 | ✗ | std::vector<Data> & Function::getVecParam(){ | |
246 | ✗ | return p_vecParam; | |
247 | } | ||
248 | |||
249 | ///Gets the returnValue of the Function | ||
250 | /** @return returnValue of the Function | ||
251 | */ | ||
252 | ✗ | const Data & Function::getReturnValue() const{ | |
253 | ✗ | return p_returnValue; | |
254 | } | ||
255 | |||
256 | ///Gets the returnValue of the Function | ||
257 | /** @return returnValue of the Function | ||
258 | */ | ||
259 | ✗ | Data & Function::getReturnValue(){ | |
260 | ✗ | return p_returnValue; | |
261 | } | ||
262 | |||
263 | ///Copy Function of class Function | ||
264 | /** @param other : Function we want ot copy | ||
265 | */ | ||
266 | ✗ | void Function::copyFunction(const Function & other){ | |
267 | ✗ | p_name = other.p_name; | |
268 | ✗ | p_description = other.p_description; | |
269 | ✗ | p_vecParam = other.p_vecParam; | |
270 | ✗ | p_returnValue = other.p_returnValue; | |
271 | } | ||
272 | |||
273 | ///Initialisation Function of class Function | ||
274 | ✗ | void Function::initialisationFunction(){ | |
275 | ✗ | p_name = ""; | |
276 | ✗ | p_description = ""; | |
277 | } | ||
278 | |||
279 | ///Get the name of the class Message | ||
280 | /** @return name of the class Message | ||
281 | */ | ||
282 | template<> | ||
283 | 3 | std::string phoenix_getTypeName<Message >(){ | |
284 |
1/1✓ Branch 2 taken 3 times.
|
3 | return "Message"; |
285 | } | ||
286 | |||
287 | ///Constructor of class Message | ||
288 |
1/1✓ Branch 3 taken 19 times.
|
19 | Message::Message(){ |
289 |
1/1✓ Branch 1 taken 19 times.
|
19 | initialisationMessage(); |
290 | 19 | } | |
291 | |||
292 | ///Copy Constructor of class Message | ||
293 | /** @param other : Message we want ot copy | ||
294 | */ | ||
295 | ✗ | Message::Message(const Message & other){ | |
296 | ✗ | copyMessage(other); | |
297 | } | ||
298 | |||
299 | ///Destructor of class Message | ||
300 | 38 | Message::~Message(){ | |
301 | |||
302 | } | ||
303 | |||
304 | ///Operator = of class Message | ||
305 | /** @param other : Message we want ot copy | ||
306 | * @return copied class Message | ||
307 | */ | ||
308 | ✗ | Message & Message::operator = (const Message & other){ | |
309 | ✗ | copyMessage(other); | |
310 | ✗ | return *this; | |
311 | } | ||
312 | |||
313 | ///Sets the sendTime of the Message | ||
314 | /** @param sendTime : sendTime of the Message | ||
315 | */ | ||
316 | 7 | void Message::setSendTime(const time_t & sendTime){ | |
317 | 7 | p_sendTime = sendTime; | |
318 | 7 | } | |
319 | |||
320 | ///Sets the id of the Message | ||
321 | /** @param id : id of the Message | ||
322 | */ | ||
323 | 10 | void Message::setId(size_t id){ | |
324 | 10 | p_id = id; | |
325 | 10 | } | |
326 | |||
327 | ///Sets the isConfirmationNeeded of the Message | ||
328 | /** @param isConfirmationNeeded : isConfirmationNeeded of the Message | ||
329 | */ | ||
330 | ✗ | void Message::setIsConfirmationNeeded(bool isConfirmationNeeded){ | |
331 | ✗ | p_isConfirmationNeeded = isConfirmationNeeded; | |
332 | } | ||
333 | |||
334 | ///Sets the sender of the Message | ||
335 | /** @param sender : sender of the Message | ||
336 | */ | ||
337 | 7 | void Message::setSender(const PString & sender){ | |
338 | 7 | p_sender = sender; | |
339 | 7 | } | |
340 | |||
341 | ///Sets the vecRecver of the Message | ||
342 | /** @param vecRecver : vecRecver of the Message | ||
343 | */ | ||
344 | ✗ | void Message::setVecRecver(const std::vector<PString> & vecRecver){ | |
345 | ✗ | p_vecRecver = vecRecver; | |
346 | } | ||
347 | |||
348 | ///Sets the type of the Message | ||
349 | /** @param type : type of the Message | ||
350 | */ | ||
351 | 11 | void Message::setType(const MessageType::MessageType & type){ | |
352 | 11 | p_type = type; | |
353 | 11 | } | |
354 | |||
355 | ///Sets the data of the Message | ||
356 | /** @param data : data of the Message | ||
357 | */ | ||
358 | 1 | void Message::setData(const Data & data){ | |
359 | 1 | p_data = data; | |
360 | 1 | } | |
361 | |||
362 | ///Gets the sendTime of the Message | ||
363 | /** @return sendTime of the Message | ||
364 | */ | ||
365 | ✗ | const time_t & Message::getSendTime() const{ | |
366 | ✗ | return p_sendTime; | |
367 | } | ||
368 | |||
369 | ///Gets the sendTime of the Message | ||
370 | /** @return sendTime of the Message | ||
371 | */ | ||
372 | 3 | time_t & Message::getSendTime(){ | |
373 | 3 | return p_sendTime; | |
374 | } | ||
375 | |||
376 | ///Gets the id of the Message | ||
377 | /** @return id of the Message | ||
378 | */ | ||
379 | ✗ | size_t Message::getId() const{ | |
380 | ✗ | return p_id; | |
381 | } | ||
382 | |||
383 | ///Gets the id of the Message | ||
384 | /** @return id of the Message | ||
385 | */ | ||
386 | 1 | size_t & Message::getId(){ | |
387 | 1 | return p_id; | |
388 | } | ||
389 | |||
390 | ///Gets the isConfirmationNeeded of the Message | ||
391 | /** @return isConfirmationNeeded of the Message | ||
392 | */ | ||
393 | 2 | bool Message::getIsConfirmationNeeded() const{ | |
394 | 2 | return p_isConfirmationNeeded; | |
395 | } | ||
396 | |||
397 | ///Gets the isConfirmationNeeded of the Message | ||
398 | /** @return isConfirmationNeeded of the Message | ||
399 | */ | ||
400 | 6 | bool & Message::getIsConfirmationNeeded(){ | |
401 | 6 | return p_isConfirmationNeeded; | |
402 | } | ||
403 | |||
404 | ///Gets the sender of the Message | ||
405 | /** @return sender of the Message | ||
406 | */ | ||
407 | ✗ | const PString & Message::getSender() const{ | |
408 | ✗ | return p_sender; | |
409 | } | ||
410 | |||
411 | ///Gets the sender of the Message | ||
412 | /** @return sender of the Message | ||
413 | */ | ||
414 | 1 | PString & Message::getSender(){ | |
415 | 1 | return p_sender; | |
416 | } | ||
417 | |||
418 | ///Gets the vecRecver of the Message | ||
419 | /** @return vecRecver of the Message | ||
420 | */ | ||
421 | 2 | const std::vector<PString> & Message::getVecRecver() const{ | |
422 | 2 | return p_vecRecver; | |
423 | } | ||
424 | |||
425 | ///Gets the vecRecver of the Message | ||
426 | /** @return vecRecver of the Message | ||
427 | */ | ||
428 | 6 | std::vector<PString> & Message::getVecRecver(){ | |
429 | 6 | return p_vecRecver; | |
430 | } | ||
431 | |||
432 | ///Gets the type of the Message | ||
433 | /** @return type of the Message | ||
434 | */ | ||
435 | ✗ | const MessageType::MessageType & Message::getType() const{ | |
436 | ✗ | return p_type; | |
437 | } | ||
438 | |||
439 | ///Gets the type of the Message | ||
440 | /** @return type of the Message | ||
441 | */ | ||
442 | 10 | MessageType::MessageType & Message::getType(){ | |
443 | 10 | return p_type; | |
444 | } | ||
445 | |||
446 | ///Gets the data of the Message | ||
447 | /** @return data of the Message | ||
448 | */ | ||
449 | ✗ | const Data & Message::getData() const{ | |
450 | ✗ | return p_data; | |
451 | } | ||
452 | |||
453 | ///Gets the data of the Message | ||
454 | /** @return data of the Message | ||
455 | */ | ||
456 | ✗ | Data & Message::getData(){ | |
457 | ✗ | return p_data; | |
458 | } | ||
459 | |||
460 | ///Copy Function of class Message | ||
461 | /** @param other : Message we want ot copy | ||
462 | */ | ||
463 | ✗ | void Message::copyMessage(const Message & other){ | |
464 | ✗ | p_sendTime = other.p_sendTime; | |
465 | ✗ | p_id = other.p_id; | |
466 | ✗ | p_isConfirmationNeeded = other.p_isConfirmationNeeded; | |
467 | ✗ | p_sender = other.p_sender; | |
468 | ✗ | p_vecRecver = other.p_vecRecver; | |
469 | ✗ | p_type = other.p_type; | |
470 | ✗ | p_data = other.p_data; | |
471 | } | ||
472 | |||
473 | ///Initialisation Function of class Message | ||
474 | 19 | void Message::initialisationMessage(){ | |
475 | 19 | p_id = 0lu; | |
476 | 19 | p_isConfirmationNeeded = false; | |
477 | 19 | p_sender = ""; | |
478 | 19 | } | |
479 | |||
480 | ///Get the name of the class DaemonLatency | ||
481 | /** @return name of the class DaemonLatency | ||
482 | */ | ||
483 | template<> | ||
484 | ✗ | std::string phoenix_getTypeName<DaemonLatency >(){ | |
485 | ✗ | return "DaemonLatency"; | |
486 | } | ||
487 | |||
488 | ///Constructor of class DaemonLatency | ||
489 | 31 | DaemonLatency::DaemonLatency(){ | |
490 |
1/1✓ Branch 1 taken 31 times.
|
31 | initialisationDaemonLatency(); |
491 | 31 | } | |
492 | |||
493 | ///Copy Constructor of class DaemonLatency | ||
494 | /** @param other : DaemonLatency we want ot copy | ||
495 | */ | ||
496 | ✗ | DaemonLatency::DaemonLatency(const DaemonLatency & other){ | |
497 | ✗ | copyDaemonLatency(other); | |
498 | } | ||
499 | |||
500 | ///Destructor of class DaemonLatency | ||
501 | 62 | DaemonLatency::~DaemonLatency(){ | |
502 | |||
503 | } | ||
504 | |||
505 | ///Operator = of class DaemonLatency | ||
506 | /** @param other : DaemonLatency we want ot copy | ||
507 | * @return copied class DaemonLatency | ||
508 | */ | ||
509 | 16 | DaemonLatency & DaemonLatency::operator = (const DaemonLatency & other){ | |
510 | 16 | copyDaemonLatency(other); | |
511 | 16 | return *this; | |
512 | } | ||
513 | |||
514 | ///Sets the vecLatency of the DaemonLatency | ||
515 | /** @param vecLatency : vecLatency of the DaemonLatency | ||
516 | */ | ||
517 | ✗ | void DaemonLatency::setVecLatency(const std::vector<time_t> & vecLatency){ | |
518 | ✗ | p_vecLatency = vecLatency; | |
519 | } | ||
520 | |||
521 | ///Sets the nbMaxLatency of the DaemonLatency | ||
522 | /** @param nbMaxLatency : nbMaxLatency of the DaemonLatency | ||
523 | */ | ||
524 | 11 | void DaemonLatency::setNbMaxLatency(size_t nbMaxLatency){ | |
525 | 11 | p_nbMaxLatency = nbMaxLatency; | |
526 | 11 | } | |
527 | |||
528 | ///Gets the vecLatency of the DaemonLatency | ||
529 | /** @return vecLatency of the DaemonLatency | ||
530 | */ | ||
531 | ✗ | const std::vector<time_t> & DaemonLatency::getVecLatency() const{ | |
532 | ✗ | return p_vecLatency; | |
533 | } | ||
534 | |||
535 | ///Gets the vecLatency of the DaemonLatency | ||
536 | /** @return vecLatency of the DaemonLatency | ||
537 | */ | ||
538 | ✗ | std::vector<time_t> & DaemonLatency::getVecLatency(){ | |
539 | ✗ | return p_vecLatency; | |
540 | } | ||
541 | |||
542 | ///Gets the nbMaxLatency of the DaemonLatency | ||
543 | /** @return nbMaxLatency of the DaemonLatency | ||
544 | */ | ||
545 | ✗ | size_t DaemonLatency::getNbMaxLatency() const{ | |
546 | ✗ | return p_nbMaxLatency; | |
547 | } | ||
548 | |||
549 | ///Gets the nbMaxLatency of the DaemonLatency | ||
550 | /** @return nbMaxLatency of the DaemonLatency | ||
551 | */ | ||
552 | ✗ | size_t & DaemonLatency::getNbMaxLatency(){ | |
553 | ✗ | return p_nbMaxLatency; | |
554 | } | ||
555 | |||
556 | ///Copy Function of class DaemonLatency | ||
557 | /** @param other : DaemonLatency we want ot copy | ||
558 | */ | ||
559 | 16 | void DaemonLatency::copyDaemonLatency(const DaemonLatency & other){ | |
560 | 16 | p_vecLatency = other.p_vecLatency; | |
561 | 16 | p_nbMaxLatency = other.p_nbMaxLatency; | |
562 | 16 | } | |
563 | |||
564 | ///Initialisation Function of class DaemonLatency | ||
565 | 31 | void DaemonLatency::initialisationDaemonLatency(){ | |
566 | 31 | p_nbMaxLatency = 0lu; | |
567 | 31 | } | |
568 | |||
569 | ///Get the name of the class DaemonConfig | ||
570 | /** @return name of the class DaemonConfig | ||
571 | */ | ||
572 | template<> | ||
573 | ✗ | std::string phoenix_getTypeName<DaemonConfig >(){ | |
574 | ✗ | return "DaemonConfig"; | |
575 | } | ||
576 | |||
577 | ///Constructor of class DaemonConfig | ||
578 |
3/3✓ Branch 2 taken 31 times.
✓ Branch 5 taken 31 times.
✓ Branch 8 taken 31 times.
|
31 | DaemonConfig::DaemonConfig(){ |
579 |
1/1✓ Branch 1 taken 31 times.
|
31 | initialisationDaemonConfig(); |
580 | 31 | } | |
581 | |||
582 | ///Copy Constructor of class DaemonConfig | ||
583 | /** @param other : DaemonConfig we want ot copy | ||
584 | */ | ||
585 | ✗ | DaemonConfig::DaemonConfig(const DaemonConfig & other){ | |
586 | ✗ | copyDaemonConfig(other); | |
587 | } | ||
588 | |||
589 | ///Destructor of class DaemonConfig | ||
590 | 62 | DaemonConfig::~DaemonConfig(){ | |
591 | |||
592 | } | ||
593 | |||
594 | ///Operator = of class DaemonConfig | ||
595 | /** @param other : DaemonConfig we want ot copy | ||
596 | * @return copied class DaemonConfig | ||
597 | */ | ||
598 | 16 | DaemonConfig & DaemonConfig::operator = (const DaemonConfig & other){ | |
599 | 16 | copyDaemonConfig(other); | |
600 | 16 | return *this; | |
601 | } | ||
602 | |||
603 | ///Sets the hostName of the DaemonConfig | ||
604 | /** @param hostName : hostName of the DaemonConfig | ||
605 | */ | ||
606 | 11 | void DaemonConfig::setHostName(const PString & hostName){ | |
607 | 11 | p_hostName = hostName; | |
608 | 11 | } | |
609 | |||
610 | ///Sets the recievingPort of the DaemonConfig | ||
611 | /** @param recievingPort : recievingPort of the DaemonConfig | ||
612 | */ | ||
613 | 11 | void DaemonConfig::setRecievingPort(size_t recievingPort){ | |
614 | 11 | p_recievingPort = recievingPort; | |
615 | 11 | } | |
616 | |||
617 | ///Sets the name of the DaemonConfig | ||
618 | /** @param name : name of the DaemonConfig | ||
619 | */ | ||
620 | 11 | void DaemonConfig::setName(const PString & name){ | |
621 | 11 | p_name = name; | |
622 | 11 | } | |
623 | |||
624 | ///Sets the description of the DaemonConfig | ||
625 | /** @param description : description of the DaemonConfig | ||
626 | */ | ||
627 | 11 | void DaemonConfig::setDescription(const PString & description){ | |
628 | 11 | p_description = description; | |
629 | 11 | } | |
630 | |||
631 | ///Sets the latency of the DaemonConfig | ||
632 | /** @param latency : latency of the DaemonConfig | ||
633 | */ | ||
634 | ✗ | void DaemonConfig::setLatency(const DaemonLatency & latency){ | |
635 | ✗ | p_latency = latency; | |
636 | } | ||
637 | |||
638 | ///Gets the hostName of the DaemonConfig | ||
639 | /** @return hostName of the DaemonConfig | ||
640 | */ | ||
641 | ✗ | const PString & DaemonConfig::getHostName() const{ | |
642 | ✗ | return p_hostName; | |
643 | } | ||
644 | |||
645 | ///Gets the hostName of the DaemonConfig | ||
646 | /** @return hostName of the DaemonConfig | ||
647 | */ | ||
648 | 32 | PString & DaemonConfig::getHostName(){ | |
649 | 32 | return p_hostName; | |
650 | } | ||
651 | |||
652 | ///Gets the recievingPort of the DaemonConfig | ||
653 | /** @return recievingPort of the DaemonConfig | ||
654 | */ | ||
655 | ✗ | size_t DaemonConfig::getRecievingPort() const{ | |
656 | ✗ | return p_recievingPort; | |
657 | } | ||
658 | |||
659 | ///Gets the recievingPort of the DaemonConfig | ||
660 | /** @return recievingPort of the DaemonConfig | ||
661 | */ | ||
662 | 38 | size_t & DaemonConfig::getRecievingPort(){ | |
663 | 38 | return p_recievingPort; | |
664 | } | ||
665 | |||
666 | ///Gets the name of the DaemonConfig | ||
667 | /** @return name of the DaemonConfig | ||
668 | */ | ||
669 | ✗ | const PString & DaemonConfig::getName() const{ | |
670 | ✗ | return p_name; | |
671 | } | ||
672 | |||
673 | ///Gets the name of the DaemonConfig | ||
674 | /** @return name of the DaemonConfig | ||
675 | */ | ||
676 | 54 | PString & DaemonConfig::getName(){ | |
677 | 54 | return p_name; | |
678 | } | ||
679 | |||
680 | ///Gets the description of the DaemonConfig | ||
681 | /** @return description of the DaemonConfig | ||
682 | */ | ||
683 | ✗ | const PString & DaemonConfig::getDescription() const{ | |
684 | ✗ | return p_description; | |
685 | } | ||
686 | |||
687 | ///Gets the description of the DaemonConfig | ||
688 | /** @return description of the DaemonConfig | ||
689 | */ | ||
690 | ✗ | PString & DaemonConfig::getDescription(){ | |
691 | ✗ | return p_description; | |
692 | } | ||
693 | |||
694 | ///Gets the latency of the DaemonConfig | ||
695 | /** @return latency of the DaemonConfig | ||
696 | */ | ||
697 | ✗ | const DaemonLatency & DaemonConfig::getLatency() const{ | |
698 | ✗ | return p_latency; | |
699 | } | ||
700 | |||
701 | ///Gets the latency of the DaemonConfig | ||
702 | /** @return latency of the DaemonConfig | ||
703 | */ | ||
704 | 11 | DaemonLatency & DaemonConfig::getLatency(){ | |
705 | 11 | return p_latency; | |
706 | } | ||
707 | |||
708 | ///Copy Function of class DaemonConfig | ||
709 | /** @param other : DaemonConfig we want ot copy | ||
710 | */ | ||
711 | 16 | void DaemonConfig::copyDaemonConfig(const DaemonConfig & other){ | |
712 | 16 | p_hostName = other.p_hostName; | |
713 | 16 | p_recievingPort = other.p_recievingPort; | |
714 | 16 | p_name = other.p_name; | |
715 | 16 | p_description = other.p_description; | |
716 | 16 | p_latency = other.p_latency; | |
717 | 16 | } | |
718 | |||
719 | ///Initialisation Function of class DaemonConfig | ||
720 | 31 | void DaemonConfig::initialisationDaemonConfig(){ | |
721 | 31 | p_hostName = ""; | |
722 | 31 | p_recievingPort = 0lu; | |
723 | 31 | p_name = ""; | |
724 | 31 | p_description = ""; | |
725 | 31 | } | |
726 | |||
727 |