Management of external programs
#include <utils/ExternalProgram.hpp>
|
enum class | RegisteredPrograms {
CMake
, Zip
, SevenZip
, Gnuplot
,
GoogleEarth
, Gcc
, Pandoc
, PdfLatex
,
BibTex
, Latex2HTML
, Git
, GrassGis
,
R
, Rscript
} |
|
◆ RegisteredPrograms
List of pre-registered external programs
Enumerator |
---|
CMake | |
Zip | |
SevenZip | |
Gnuplot | |
GoogleEarth | |
Gcc | |
Pandoc | |
PdfLatex | |
BibTex | |
Latex2HTML | |
Git | |
GrassGis | |
R | |
Rscript | |
◆ ExternalProgram() [1/3]
openfluid::utils::ExternalProgram::ExternalProgram |
( |
| ) |
|
|
delete |
◆ ExternalProgram() [2/3]
openfluid::utils::ExternalProgram::ExternalProgram |
( |
const std::vector< std::string > & |
ProgramNames, |
|
|
const std::vector< std::string > & |
SearchPaths = std::vector< std::string >() , |
|
|
bool |
UsePathEnv = true |
|
) |
| |
Constructor for a given external programs. Automatically searches for the program at construction
- Parameters
-
[in] | ProgramNames | The possible names of the program to find |
[in] | SearchPaths | The list of paths to search. Default value is an empty list |
[in] | UsePathEnv | Enable the use of PATH environment variable to search for the program. Default value is true. |
◆ ExternalProgram() [3/3]
openfluid::utils::ExternalProgram::ExternalProgram |
( |
const std::string & |
ProgramName, |
|
|
const std::vector< std::string > & |
SearchPaths = std::vector< std::string >() , |
|
|
bool |
UsePathEnv = true |
|
) |
| |
Constructor for a given external programs. Automatically searches for the program at construction
- Parameters
-
[in] | ProgramName | The name of the program to find |
[in] | SearchPaths | The list of paths to search. Default value is an empty list |
[in] | UsePathEnv | Enable the use of PATH environment variable to search for the program. Default value is true. |
◆ ~ExternalProgram()
openfluid::utils::ExternalProgram::~ExternalProgram |
( |
| ) |
|
◆ findUsingPATHEnvVar()
static std::string openfluid::utils::ExternalProgram::findUsingPATHEnvVar |
( |
const std::vector< std::string > & |
ProgramNames | ) |
|
|
static |
Finds a program using the PATH environment variable
- Parameters
-
[in] | ProgramNames | The list of the potential program names of the program to find |
- Returns
- The full path of the first found program
◆ findUsingPathsList()
static std::string openfluid::utils::ExternalProgram::findUsingPathsList |
( |
const std::vector< std::string > & |
ProgramNames, |
|
|
const std::vector< std::string > & |
PathsList |
|
) |
| |
|
static |
Finds a program using a given paths list
- Parameters
-
[in] | ProgramNames | The list of the potential program names of the program to find |
[in] | PathsList | The list of paths to search |
- Returns
- The full path of the first found program
◆ getFullProgramPath()
std::string openfluid::utils::ExternalProgram::getFullProgramPath |
( |
| ) |
const |
|
inline |
Returns the full path of the program
- Returns
- the full path of the program if it has been found, otherwise an empty string
◆ getRegisteredProgram()
static ExternalProgram openfluid::utils::ExternalProgram::getRegisteredProgram |
( |
RegisteredPrograms |
Prog, |
|
|
const std::vector< std::string > & |
SearchPaths = std::vector< std::string >() , |
|
|
bool |
UsePathEnv = true |
|
) |
| |
|
static |
Returns an ExternalProgram object initialized with the registered program to find
- Parameters
-
[in] | Prog | The registered program to find |
[in] | SearchPaths | The list of paths to search. Default value is an empty list |
[in] | UsePathEnv | Enable the use of PATH environment variable to search for the registered program. Default value is true. |
- Returns
- An ExternalProgram object initialized with the registered program to find
◆ isFound()
bool openfluid::utils::ExternalProgram::isFound |
( |
| ) |
const |
|
inline |
Returns true if the current program has been found
- Returns
- true if the current program has been found
◆ searchForProgram()
void openfluid::utils::ExternalProgram::searchForProgram |
( |
| ) |
|
The documentation for this class was generated from the following file: