| 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 "ProgramCall.h" | ||
| 11 | |||
| 12 | ///Constructor of class ProgramCall | ||
| 13 |
3/3✓ Branch 0 (3→4) taken 18 times.
✓ Branch 2 (4→5) taken 18 times.
✓ Branch 4 (5→6) taken 18 times.
|
18 | ProgramCall::ProgramCall(){ |
| 14 |
1/1✓ Branch 0 (6→7) taken 18 times.
|
18 | initialisationProgramCall(); |
| 15 | 18 | } | |
| 16 | |||
| 17 | ///Copy Constructor of class ProgramCall | ||
| 18 | /** @param other : ProgramCall we want ot copy | ||
| 19 | */ | ||
| 20 |
3/3✓ Branch 0 (3→4) taken 68 times.
✓ Branch 2 (4→5) taken 68 times.
✓ Branch 4 (5→6) taken 68 times.
|
68 | ProgramCall::ProgramCall(const ProgramCall & other){ |
| 21 |
1/1✓ Branch 0 (6→7) taken 68 times.
|
68 | copyProgramCall(other); |
| 22 | 68 | } | |
| 23 | |||
| 24 | ///Destructor of class ProgramCall | ||
| 25 | 86 | ProgramCall::~ProgramCall(){ | |
| 26 | |||
| 27 | 86 | } | |
| 28 | |||
| 29 | ///Operator = of class ProgramCall | ||
| 30 | /** @param other : ProgramCall we want ot copy | ||
| 31 | * @return copied class ProgramCall | ||
| 32 | */ | ||
| 33 | 1 | ProgramCall & ProgramCall::operator = (const ProgramCall & other){ | |
| 34 | 1 | copyProgramCall(other); | |
| 35 | 1 | return *this; | |
| 36 | } | ||
| 37 | |||
| 38 | ///Sets the name of the ProgramCall | ||
| 39 | /** @param name : name of the ProgramCall | ||
| 40 | */ | ||
| 41 | 17 | void ProgramCall::setName(const PString & name){ | |
| 42 | 17 | p_name = name; | |
| 43 | 17 | } | |
| 44 | |||
| 45 | ///Sets the command of the ProgramCall | ||
| 46 | /** @param command : command of the ProgramCall | ||
| 47 | */ | ||
| 48 | 17 | void ProgramCall::setCommand(const PString & command){ | |
| 49 | 17 | p_command = command; | |
| 50 | 17 | } | |
| 51 | |||
| 52 | ///Sets the workingDirectory of the ProgramCall | ||
| 53 | /** @param workingDirectory : workingDirectory of the ProgramCall | ||
| 54 | */ | ||
| 55 | 17 | void ProgramCall::setWorkingDirectory(const PPath & workingDirectory){ | |
| 56 | 17 | p_workingDirectory = workingDirectory; | |
| 57 | 17 | } | |
| 58 | |||
| 59 | ///Sets the exitStatus of the ProgramCall | ||
| 60 | /** @param exitStatus : exitStatus of the ProgramCall | ||
| 61 | */ | ||
| 62 | 33 | void ProgramCall::setExitStatus(int exitStatus){ | |
| 63 | 33 | p_exitStatus = exitStatus; | |
| 64 | 33 | } | |
| 65 | |||
| 66 | ///Sets the logFile of the ProgramCall | ||
| 67 | /** @param logFile : logFile of the ProgramCall | ||
| 68 | */ | ||
| 69 | 17 | void ProgramCall::setLogFile(const PPath & logFile){ | |
| 70 | 17 | p_logFile = logFile; | |
| 71 | 17 | } | |
| 72 | |||
| 73 | ///Gets the name of the ProgramCall | ||
| 74 | /** @return name of the ProgramCall | ||
| 75 | */ | ||
| 76 | 2 | const PString & ProgramCall::getName() const{ | |
| 77 | 2 | return p_name; | |
| 78 | } | ||
| 79 | |||
| 80 | ///Gets the name of the ProgramCall | ||
| 81 | /** @return name of the ProgramCall | ||
| 82 | */ | ||
| 83 | 2 | PString & ProgramCall::getName(){ | |
| 84 | 2 | return p_name; | |
| 85 | } | ||
| 86 | |||
| 87 | ///Gets the command of the ProgramCall | ||
| 88 | /** @return command of the ProgramCall | ||
| 89 | */ | ||
| 90 | 2 | const PString & ProgramCall::getCommand() const{ | |
| 91 | 2 | return p_command; | |
| 92 | } | ||
| 93 | |||
| 94 | ///Gets the command of the ProgramCall | ||
| 95 | /** @return command of the ProgramCall | ||
| 96 | */ | ||
| 97 | 18 | PString & ProgramCall::getCommand(){ | |
| 98 | 18 | return p_command; | |
| 99 | } | ||
| 100 | |||
| 101 | ///Gets the workingDirectory of the ProgramCall | ||
| 102 | /** @return workingDirectory of the ProgramCall | ||
| 103 | */ | ||
| 104 | 2 | const PPath & ProgramCall::getWorkingDirectory() const{ | |
| 105 | 2 | return p_workingDirectory; | |
| 106 | } | ||
| 107 | |||
| 108 | ///Gets the workingDirectory of the ProgramCall | ||
| 109 | /** @return workingDirectory of the ProgramCall | ||
| 110 | */ | ||
| 111 | 33 | PPath & ProgramCall::getWorkingDirectory(){ | |
| 112 | 33 | return p_workingDirectory; | |
| 113 | } | ||
| 114 | |||
| 115 | ///Gets the exitStatus of the ProgramCall | ||
| 116 | /** @return exitStatus of the ProgramCall | ||
| 117 | */ | ||
| 118 | 24 | int ProgramCall::getExitStatus() const{ | |
| 119 | 24 | return p_exitStatus; | |
| 120 | } | ||
| 121 | |||
| 122 | ///Gets the exitStatus of the ProgramCall | ||
| 123 | /** @return exitStatus of the ProgramCall | ||
| 124 | */ | ||
| 125 | 2 | int & ProgramCall::getExitStatus(){ | |
| 126 | 2 | return p_exitStatus; | |
| 127 | } | ||
| 128 | |||
| 129 | ///Gets the logFile of the ProgramCall | ||
| 130 | /** @return logFile of the ProgramCall | ||
| 131 | */ | ||
| 132 | 2 | const PPath & ProgramCall::getLogFile() const{ | |
| 133 | 2 | return p_logFile; | |
| 134 | } | ||
| 135 | |||
| 136 | ///Gets the logFile of the ProgramCall | ||
| 137 | /** @return logFile of the ProgramCall | ||
| 138 | */ | ||
| 139 | 33 | PPath & ProgramCall::getLogFile(){ | |
| 140 | 33 | return p_logFile; | |
| 141 | } | ||
| 142 | |||
| 143 | ///Copy Function of class ProgramCall | ||
| 144 | /** @param other : ProgramCall we want ot copy | ||
| 145 | */ | ||
| 146 | 69 | void ProgramCall::copyProgramCall(const ProgramCall & other){ | |
| 147 | 69 | p_name = other.p_name; | |
| 148 | 69 | p_command = other.p_command; | |
| 149 | 69 | p_workingDirectory = other.p_workingDirectory; | |
| 150 | 69 | p_exitStatus = other.p_exitStatus; | |
| 151 | 69 | p_logFile = other.p_logFile; | |
| 152 | 69 | } | |
| 153 | |||
| 154 | ///Initialisation Function of class ProgramCall | ||
| 155 | 18 | void ProgramCall::initialisationProgramCall(){ | |
| 156 | 18 | p_name = ""; | |
| 157 | 18 | p_command = ""; | |
| 158 |
2/2✓ Branch 0 (4→5) taken 18 times.
✓ Branch 2 (5→6) taken 18 times.
|
18 | p_workingDirectory = PPath(); |
| 159 | 18 | p_exitStatus = 0; | |
| 160 |
2/2✓ Branch 0 (7→8) taken 18 times.
✓ Branch 2 (8→9) taken 18 times.
|
18 | p_logFile = PPath(); |
| 161 | 18 | } | |
| 162 | |||
| 163 |