FEDEM Solver  R8.0
Source code of the dynamics solver
FFaAppInfo.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
8 #ifndef FFA_APPLICATION_INFO_H
9 #define FFA_APPLICATION_INFO_H
10 
11 #include <string>
12 
13 
19 namespace FFaAppInfo
20 {
22  void openConsole(bool withGUI = false);
24  void closeConsole(bool acknowledge = true);
26  bool isConsole();
28  bool haveConsole();
29 
31  std::string getVersion();
33  std::string getUser();
35  std::string getDate();
36 
38  void init(const char* program);
40  std::string getProgramPath(const std::string& program, bool fnutts = true);
42  std::string checkProgramPath(const std::string& program);
44  const std::string& getProgramPath();
45 
47  std::string getCWD();
49  bool isInCwd();
50 }
51 
52 #endif
Namespace with functions returning information about the application.
Definition: FFaAppInfo.H:20
std::string checkProgramPath(const std::string &program)
Returns path of a program, or blank if not existing.
Definition: FFaAppInfo.C:230
void closeConsole(bool acknowledge=true)
Closes the current console window.
Definition: FFaAppInfo.C:84
void openConsole(bool withGUI=false)
Sets this to be a console application, optionally with GUI too.
Definition: FFaAppInfo.C:56
bool haveConsole()
Returns true if this application has a console windows.
Definition: FFaAppInfo.C:111
std::string getCWD()
Returns the current working directory of the program.
Definition: FFaAppInfo.C:147
bool isConsole()
Returns true if this is a console-only application.
Definition: FFaAppInfo.C:105
void init(const char *program)
Initializes the program path.
Definition: FFaAppInfo.C:156
std::string getUser()
Returns the user id of the executing process.
Definition: FFaAppInfo.C:124
std::string getVersion()
Returns the current program version.
Definition: FFaAppInfo.C:117
bool isInCwd()
Returns whether this program is in current working dir or not.
Definition: FFaAppInfo.C:256
std::string getProgramPath(const std::string &program, bool fnutts=true)
Returns full path of a program, or blank if not existing.
Definition: FFaAppInfo.C:207
std::string getDate()
Returns the current date and time.
Definition: FFaAppInfo.C:138