PhoenixThread  1.0.0
Tools to ease parallel programming in C++
Loading...
Searching...
No Matches
ProgramCall Class Reference

Call a program. More...

#include <ProgramCall.h>

Public Member Functions

PString & getCommand ()
 Gets the command of the ProgramCall.
 
const PString & getCommand () const
 Gets the command of the ProgramCall.
 
int & getExitStatus ()
 Gets the exitStatus of the ProgramCall.
 
int getExitStatus () const
 Gets the exitStatus of the ProgramCall.
 
PPath & getLogFile ()
 Gets the logFile of the ProgramCall.
 
const PPath & getLogFile () const
 Gets the logFile of the ProgramCall.
 
PString & getName ()
 Gets the name of the ProgramCall.
 
const PString & getName () const
 Gets the name of the ProgramCall.
 
PPath & getWorkingDirectory ()
 Gets the workingDirectory of the ProgramCall.
 
const PPath & getWorkingDirectory () const
 Gets the workingDirectory of the ProgramCall.
 
ProgramCalloperator= (const ProgramCall &other)
 Operator = of class ProgramCall.
 
 ProgramCall ()
 Constructor of class ProgramCall.
 
 ProgramCall (const ProgramCall &other)
 Copy Constructor of class ProgramCall.
 
void setCommand (const PString &command)
 Sets the command of the ProgramCall.
 
void setExitStatus (int exitStatus)
 Sets the exitStatus of the ProgramCall.
 
void setLogFile (const PPath &logFile)
 Sets the logFile of the ProgramCall.
 
void setName (const PString &name)
 Sets the name of the ProgramCall.
 
void setWorkingDirectory (const PPath &workingDirectory)
 Sets the workingDirectory of the ProgramCall.
 
virtual ~ProgramCall ()
 Destructor of class ProgramCall.
 

Protected Member Functions

void copyProgramCall (const ProgramCall &other)
 Copy Function of class ProgramCall.
 

Private Member Functions

void initialisationProgramCall ()
 Initialisation Function of class ProgramCall.
 

Private Attributes

PString p_command
 Command to be executed.
 
int p_exitStatus
 Exist status of the command.
 
PPath p_logFile
 File where to put log of called program.
 
PString p_name
 Name of the call.
 
PPath p_workingDirectory
 Directory in which to execute the program.
 

Detailed Description

Call a program.

Definition at line 14 of file ProgramCall.h.

Constructor & Destructor Documentation

◆ ProgramCall() [1/2]

ProgramCall::ProgramCall ( )

Constructor of class ProgramCall.

Definition at line 13 of file ProgramCall.cpp.

13 {
15}
void initialisationProgramCall()
Initialisation Function of class ProgramCall.

References initialisationProgramCall().

Referenced by copyProgramCall(), operator=(), and ProgramCall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProgramCall() [2/2]

ProgramCall::ProgramCall ( const ProgramCall & other)

Copy Constructor of class ProgramCall.

Parameters
other: ProgramCall we want ot copy

Definition at line 20 of file ProgramCall.cpp.

20 {
21 copyProgramCall(other);
22}
void copyProgramCall(const ProgramCall &other)
Copy Function of class ProgramCall.

References copyProgramCall(), and ProgramCall().

+ Here is the call graph for this function:

◆ ~ProgramCall()

ProgramCall::~ProgramCall ( )
virtual

Destructor of class ProgramCall.

Definition at line 25 of file ProgramCall.cpp.

25 {
26
27}

Member Function Documentation

◆ copyProgramCall()

void ProgramCall::copyProgramCall ( const ProgramCall & other)
protected

Copy Function of class ProgramCall.

Parameters
other: ProgramCall we want ot copy

Definition at line 146 of file ProgramCall.cpp.

146 {
147 p_name = other.p_name;
148 p_command = other.p_command;
151 p_logFile = other.p_logFile;
152}
PString p_command
Command to be executed.
Definition ProgramCall.h:42
PString p_name
Name of the call.
Definition ProgramCall.h:40
int p_exitStatus
Exist status of the command.
Definition ProgramCall.h:46
PPath p_logFile
File where to put log of called program.
Definition ProgramCall.h:48
PPath p_workingDirectory
Directory in which to execute the program.
Definition ProgramCall.h:44

References p_command, p_exitStatus, p_logFile, p_name, p_workingDirectory, and ProgramCall().

Referenced by operator=(), and ProgramCall().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCommand() [1/2]

PString & ProgramCall::getCommand ( )

Gets the command of the ProgramCall.

Returns
command of the ProgramCall

Definition at line 97 of file ProgramCall.cpp.

97 {
98 return p_command;
99}

References p_command.

◆ getCommand() [2/2]

const PString & ProgramCall::getCommand ( ) const

Gets the command of the ProgramCall.

Returns
command of the ProgramCall

Definition at line 90 of file ProgramCall.cpp.

90 {
91 return p_command;
92}

References p_command.

Referenced by phoenix_program_call().

+ Here is the caller graph for this function:

◆ getExitStatus() [1/2]

int & ProgramCall::getExitStatus ( )

Gets the exitStatus of the ProgramCall.

Returns
exitStatus of the ProgramCall

Definition at line 125 of file ProgramCall.cpp.

125 {
126 return p_exitStatus;
127}

References p_exitStatus.

◆ getExitStatus() [2/2]

int ProgramCall::getExitStatus ( ) const

Gets the exitStatus of the ProgramCall.

Returns
exitStatus of the ProgramCall

Definition at line 118 of file ProgramCall.cpp.

118 {
119 return p_exitStatus;
120}

References p_exitStatus.

◆ getLogFile() [1/2]

PPath & ProgramCall::getLogFile ( )

Gets the logFile of the ProgramCall.

Returns
logFile of the ProgramCall

Definition at line 139 of file ProgramCall.cpp.

139 {
140 return p_logFile;
141}

References p_logFile.

◆ getLogFile() [2/2]

const PPath & ProgramCall::getLogFile ( ) const

Gets the logFile of the ProgramCall.

Returns
logFile of the ProgramCall

Definition at line 132 of file ProgramCall.cpp.

132 {
133 return p_logFile;
134}

References p_logFile.

Referenced by phoenix_program_call().

+ Here is the caller graph for this function:

◆ getName() [1/2]

PString & ProgramCall::getName ( )

Gets the name of the ProgramCall.

Returns
name of the ProgramCall

Definition at line 83 of file ProgramCall.cpp.

83 {
84 return p_name;
85}

References p_name.

◆ getName() [2/2]

const PString & ProgramCall::getName ( ) const

Gets the name of the ProgramCall.

Returns
name of the ProgramCall

Definition at line 76 of file ProgramCall.cpp.

76 {
77 return p_name;
78}

References p_name.

◆ getWorkingDirectory() [1/2]

PPath & ProgramCall::getWorkingDirectory ( )

Gets the workingDirectory of the ProgramCall.

Returns
workingDirectory of the ProgramCall

Definition at line 111 of file ProgramCall.cpp.

111 {
112 return p_workingDirectory;
113}

References p_workingDirectory.

◆ getWorkingDirectory() [2/2]

const PPath & ProgramCall::getWorkingDirectory ( ) const

Gets the workingDirectory of the ProgramCall.

Returns
workingDirectory of the ProgramCall

Definition at line 104 of file ProgramCall.cpp.

104 {
105 return p_workingDirectory;
106}

References p_workingDirectory.

Referenced by phoenix_program_call().

+ Here is the caller graph for this function:

◆ initialisationProgramCall()

void ProgramCall::initialisationProgramCall ( )
private

Initialisation Function of class ProgramCall.

Definition at line 155 of file ProgramCall.cpp.

155 {
156 p_name = "";
157 p_command = "";
158 p_workingDirectory = PPath();
159 p_exitStatus = 0;
160 p_logFile = PPath();
161}

References p_command, p_exitStatus, p_logFile, p_name, and p_workingDirectory.

Referenced by ProgramCall().

+ Here is the caller graph for this function:

◆ operator=()

ProgramCall & ProgramCall::operator= ( const ProgramCall & other)

Operator = of class ProgramCall.

Parameters
other: ProgramCall we want ot copy
Returns
copied class ProgramCall

Definition at line 33 of file ProgramCall.cpp.

33 {
34 copyProgramCall(other);
35 return *this;
36}

References copyProgramCall(), and ProgramCall().

+ Here is the call graph for this function:

◆ setCommand()

void ProgramCall::setCommand ( const PString & command)

Sets the command of the ProgramCall.

Parameters
command: command of the ProgramCall

Definition at line 48 of file ProgramCall.cpp.

48 {
49 p_command = command;
50}

References p_command.

Referenced by phoenix_program_addcall().

+ Here is the caller graph for this function:

◆ setExitStatus()

void ProgramCall::setExitStatus ( int exitStatus)

Sets the exitStatus of the ProgramCall.

Parameters
exitStatus: exitStatus of the ProgramCall

Definition at line 62 of file ProgramCall.cpp.

62 {
63 p_exitStatus = exitStatus;
64}

References p_exitStatus.

Referenced by phoenix_program_addcall(), and phoenix_program_call().

+ Here is the caller graph for this function:

◆ setLogFile()

void ProgramCall::setLogFile ( const PPath & logFile)

Sets the logFile of the ProgramCall.

Parameters
logFile: logFile of the ProgramCall

Definition at line 69 of file ProgramCall.cpp.

69 {
70 p_logFile = logFile;
71}

References p_logFile.

Referenced by phoenix_program_addcall().

+ Here is the caller graph for this function:

◆ setName()

void ProgramCall::setName ( const PString & name)

Sets the name of the ProgramCall.

Parameters
name: name of the ProgramCall

Definition at line 41 of file ProgramCall.cpp.

41 {
42 p_name = name;
43}

References p_name.

Referenced by phoenix_program_addcall().

+ Here is the caller graph for this function:

◆ setWorkingDirectory()

void ProgramCall::setWorkingDirectory ( const PPath & workingDirectory)

Sets the workingDirectory of the ProgramCall.

Parameters
workingDirectory: workingDirectory of the ProgramCall

Definition at line 55 of file ProgramCall.cpp.

55 {
56 p_workingDirectory = workingDirectory;
57}

References p_workingDirectory.

Referenced by phoenix_program_addcall().

+ Here is the caller graph for this function:

Member Data Documentation

◆ p_command

PString ProgramCall::p_command
private

Command to be executed.

Definition at line 42 of file ProgramCall.h.

Referenced by copyProgramCall(), getCommand(), getCommand(), initialisationProgramCall(), and setCommand().

◆ p_exitStatus

int ProgramCall::p_exitStatus
private

Exist status of the command.

Definition at line 46 of file ProgramCall.h.

Referenced by copyProgramCall(), getExitStatus(), getExitStatus(), initialisationProgramCall(), and setExitStatus().

◆ p_logFile

PPath ProgramCall::p_logFile
private

File where to put log of called program.

Definition at line 48 of file ProgramCall.h.

Referenced by copyProgramCall(), getLogFile(), getLogFile(), initialisationProgramCall(), and setLogFile().

◆ p_name

PString ProgramCall::p_name
private

Name of the call.

Definition at line 40 of file ProgramCall.h.

Referenced by copyProgramCall(), getName(), getName(), initialisationProgramCall(), and setName().

◆ p_workingDirectory

PPath ProgramCall::p_workingDirectory
private

Directory in which to execute the program.

Definition at line 44 of file ProgramCall.h.

Referenced by copyProgramCall(), getWorkingDirectory(), getWorkingDirectory(), initialisationProgramCall(), and setWorkingDirectory().


The documentation for this class was generated from the following files: