| 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 "Shadok.h" | ||
| 9 | |||
| 10 | ///Get the name of the class Shadok | ||
| 11 | /** @return name of the class Shadok | ||
| 12 | */ | ||
| 13 | template<> | ||
| 14 | 5 | std::string phoenix_getTypeName<Shadok >(){ | |
| 15 |
1/1✓ Branch 0 (4→5) taken 5 times.
|
10 | return "Shadok"; |
| 16 | } | ||
| 17 | |||
| 18 | ///Constructor of class Shadok | ||
| 19 | 4 | Shadok::Shadok(){ | |
| 20 |
1/1✓ Branch 0 (3→4) taken 4 times.
|
4 | initialisationShadok(); |
| 21 | 4 | } | |
| 22 | |||
| 23 | ///Copy Constructor of class Shadok | ||
| 24 | /** @param other : Shadok we want ot copy | ||
| 25 | */ | ||
| 26 | 1 | Shadok::Shadok(const Shadok & other){ | |
| 27 |
1/1✓ Branch 0 (3→4) taken 1 times.
|
1 | copyShadok(other); |
| 28 | 1 | } | |
| 29 | |||
| 30 | ///Destructor of class Shadok | ||
| 31 | 5 | Shadok::~Shadok(){ | |
| 32 | |||
| 33 | 5 | } | |
| 34 | |||
| 35 | ///Operator = of class Shadok | ||
| 36 | /** @param other : Shadok we want ot copy | ||
| 37 | * @return copied class Shadok | ||
| 38 | */ | ||
| 39 | 1 | Shadok & Shadok::operator = (const Shadok & other){ | |
| 40 | 1 | copyShadok(other); | |
| 41 | 1 | return *this; | |
| 42 | } | ||
| 43 | |||
| 44 | ///Sets the age of the Shadok | ||
| 45 | /** @param age : age of the Shadok | ||
| 46 | */ | ||
| 47 | 2 | void Shadok::setAge(int age){ | |
| 48 | 2 | p_age = age; | |
| 49 | 2 | } | |
| 50 | |||
| 51 | ///Sets the name of the Shadok | ||
| 52 | /** @param name : name of the Shadok | ||
| 53 | */ | ||
| 54 | 1 | void Shadok::setName(const std::string & name){ | |
| 55 | 1 | p_name = name; | |
| 56 | 1 | } | |
| 57 | |||
| 58 | ///Gets the age of the Shadok | ||
| 59 | /** @return age of the Shadok | ||
| 60 | */ | ||
| 61 | 4 | int Shadok::getAge() const{ | |
| 62 | 4 | return p_age; | |
| 63 | } | ||
| 64 | |||
| 65 | ///Gets the age of the Shadok | ||
| 66 | /** @return age of the Shadok | ||
| 67 | */ | ||
| 68 | 4 | int & Shadok::getAge(){ | |
| 69 | 4 | return p_age; | |
| 70 | } | ||
| 71 | |||
| 72 | ///Gets the name of the Shadok | ||
| 73 | /** @return name of the Shadok | ||
| 74 | */ | ||
| 75 | ✗ | const std::string & Shadok::getName() const{ | |
| 76 | ✗ | return p_name; | |
| 77 | } | ||
| 78 | |||
| 79 | ///Gets the name of the Shadok | ||
| 80 | /** @return name of the Shadok | ||
| 81 | */ | ||
| 82 | ✗ | std::string & Shadok::getName(){ | |
| 83 | ✗ | return p_name; | |
| 84 | } | ||
| 85 | |||
| 86 | ///Copy Function of class Shadok | ||
| 87 | /** @param other : Shadok we want ot copy | ||
| 88 | */ | ||
| 89 | 2 | void Shadok::copyShadok(const Shadok & other){ | |
| 90 | 2 | p_age = other.p_age; | |
| 91 | 2 | p_name = other.p_name; | |
| 92 | 2 | } | |
| 93 | |||
| 94 | ///Initialisation Function of class Shadok | ||
| 95 | 4 | void Shadok::initialisationShadok(){ | |
| 96 | 4 | p_age = 0; | |
| 97 | 4 | } | |
| 98 | |||
| 99 |