PhoenixThread
1.2.3
Tools to ease parallel programming in C++
Toggle main menu visibility
Loading...
Searching...
No Matches
ProgramCall.cpp
Go to the documentation of this file.
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
13
ProgramCall::ProgramCall
(){
14
initialisationProgramCall
();
15
}
16
18
20
ProgramCall::ProgramCall
(
const
ProgramCall
& other){
21
copyProgramCall
(other);
22
}
23
25
ProgramCall::~ProgramCall
(){
26
27
}
28
30
33
ProgramCall
&
ProgramCall::operator =
(
const
ProgramCall
& other){
34
copyProgramCall
(other);
35
return
*
this
;
36
}
37
39
41
void
ProgramCall::setName
(
const
PString & name){
42
p_name
= name;
43
}
44
46
48
void
ProgramCall::setCommand
(
const
PString & command){
49
p_command
= command;
50
}
51
53
55
void
ProgramCall::setWorkingDirectory
(
const
PPath & workingDirectory){
56
p_workingDirectory
= workingDirectory;
57
}
58
60
62
void
ProgramCall::setExitStatus
(
int
exitStatus){
63
p_exitStatus
= exitStatus;
64
}
65
67
69
void
ProgramCall::setLogFile
(
const
PPath & logFile){
70
p_logFile
= logFile;
71
}
72
74
76
const
PString &
ProgramCall::getName
()
const
{
77
return
p_name
;
78
}
79
81
83
PString &
ProgramCall::getName
(){
84
return
p_name
;
85
}
86
88
90
const
PString &
ProgramCall::getCommand
()
const
{
91
return
p_command
;
92
}
93
95
97
PString &
ProgramCall::getCommand
(){
98
return
p_command
;
99
}
100
102
104
const
PPath &
ProgramCall::getWorkingDirectory
()
const
{
105
return
p_workingDirectory
;
106
}
107
109
111
PPath &
ProgramCall::getWorkingDirectory
(){
112
return
p_workingDirectory
;
113
}
114
116
118
int
ProgramCall::getExitStatus
()
const
{
119
return
p_exitStatus
;
120
}
121
123
125
int
&
ProgramCall::getExitStatus
(){
126
return
p_exitStatus
;
127
}
128
130
132
const
PPath &
ProgramCall::getLogFile
()
const
{
133
return
p_logFile
;
134
}
135
137
139
PPath &
ProgramCall::getLogFile
(){
140
return
p_logFile
;
141
}
142
144
146
void
ProgramCall::copyProgramCall
(
const
ProgramCall
& other){
147
p_name
= other.
p_name
;
148
p_command
= other.
p_command
;
149
p_workingDirectory
= other.
p_workingDirectory
;
150
p_exitStatus
= other.
p_exitStatus
;
151
p_logFile
= other.
p_logFile
;
152
}
153
155
void
ProgramCall::initialisationProgramCall
(){
156
p_name
=
""
;
157
p_command
=
""
;
158
p_workingDirectory
= PPath();
159
p_exitStatus
= 0;
160
p_logFile
= PPath();
161
}
162
ProgramCall.h
ProgramCall::getName
const PString & getName() const
Gets the name of the ProgramCall.
Definition
ProgramCall.cpp:76
ProgramCall::p_command
PString p_command
Command to be executed.
Definition
ProgramCall.h:42
ProgramCall::setLogFile
void setLogFile(const PPath &logFile)
Sets the logFile of the ProgramCall.
Definition
ProgramCall.cpp:69
ProgramCall::getExitStatus
int getExitStatus() const
Gets the exitStatus of the ProgramCall.
Definition
ProgramCall.cpp:118
ProgramCall::getLogFile
const PPath & getLogFile() const
Gets the logFile of the ProgramCall.
Definition
ProgramCall.cpp:132
ProgramCall::ProgramCall
ProgramCall()
Constructor of class ProgramCall.
Definition
ProgramCall.cpp:13
ProgramCall::~ProgramCall
virtual ~ProgramCall()
Destructor of class ProgramCall.
Definition
ProgramCall.cpp:25
ProgramCall::p_name
PString p_name
Name of the call.
Definition
ProgramCall.h:40
ProgramCall::p_exitStatus
int p_exitStatus
Exist status of the command.
Definition
ProgramCall.h:46
ProgramCall::setName
void setName(const PString &name)
Sets the name of the ProgramCall.
Definition
ProgramCall.cpp:41
ProgramCall::getWorkingDirectory
const PPath & getWorkingDirectory() const
Gets the workingDirectory of the ProgramCall.
Definition
ProgramCall.cpp:104
ProgramCall::setExitStatus
void setExitStatus(int exitStatus)
Sets the exitStatus of the ProgramCall.
Definition
ProgramCall.cpp:62
ProgramCall::p_logFile
PPath p_logFile
File where to put log of called program.
Definition
ProgramCall.h:48
ProgramCall::initialisationProgramCall
void initialisationProgramCall()
Initialisation Function of class ProgramCall.
Definition
ProgramCall.cpp:155
ProgramCall::getCommand
const PString & getCommand() const
Gets the command of the ProgramCall.
Definition
ProgramCall.cpp:90
ProgramCall::p_workingDirectory
PPath p_workingDirectory
Directory in which to execute the program.
Definition
ProgramCall.h:44
ProgramCall::setCommand
void setCommand(const PString &command)
Sets the command of the ProgramCall.
Definition
ProgramCall.cpp:48
ProgramCall::copyProgramCall
void copyProgramCall(const ProgramCall &other)
Copy Function of class ProgramCall.
Definition
ProgramCall.cpp:146
ProgramCall::setWorkingDirectory
void setWorkingDirectory(const PPath &workingDirectory)
Sets the workingDirectory of the ProgramCall.
Definition
ProgramCall.cpp:55
ProgramCall::operator=
ProgramCall & operator=(const ProgramCall &other)
Operator = of class ProgramCall.
Definition
ProgramCall.cpp:33
src
ProgramCall.cpp
Generated by
1.17.0