FEDEM Model Database  R8.0
Source code of the FEDEM model database
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 
13 #ifndef FFA_APPLICATION_INFO_H
14 #define FFA_APPLICATION_INFO_H
15 
16 #include <string>
17 
18 
24 namespace FFaAppInfo
25 {
27  void openConsole(bool withGUI = false);
29  void closeConsole(bool acknowledge = true);
31  bool isConsole();
33  bool haveConsole();
34 
36  std::string getVersion();
38  std::string getUser();
40  std::string getDate();
41 
43  void init(const char* program);
45  std::string getProgramPath(const std::string& program, bool fnutts = true);
47  std::string checkProgramPath(const std::string& program);
49  const std::string& getProgramPath();
50 
52  std::string getCWD();
54  bool isInCwd();
55 }
56 
57 #endif
Namespace with functions returning information about the application.
Definition: FFaAppInfo.H:25
std::string checkProgramPath(const std::string &program)
Returns path of a program, or blank if not existing.
Definition: FFaAppInfo.C:235
void closeConsole(bool acknowledge=true)
Closes the current console window.
Definition: FFaAppInfo.C:89
void openConsole(bool withGUI=false)
Sets this to be a console application, optionally with GUI too.
Definition: FFaAppInfo.C:61
bool haveConsole()
Returns true if this application has a console windows.
Definition: FFaAppInfo.C:116
std::string getCWD()
Returns the current working directory of the program.
Definition: FFaAppInfo.C:152
bool isConsole()
Returns true if this is a console-only application.
Definition: FFaAppInfo.C:110
void init(const char *program)
Initializes the program path.
Definition: FFaAppInfo.C:161
std::string getUser()
Returns the user id of the executing process.
Definition: FFaAppInfo.C:129
std::string getVersion()
Returns the current program version.
Definition: FFaAppInfo.C:122
bool isInCwd()
Returns whether this program is in current working dir or not.
Definition: FFaAppInfo.C:261
std::string getProgramPath(const std::string &program, bool fnutts=true)
Returns full path of a program, or blank if not existing.
Definition: FFaAppInfo.C:212
std::string getDate()
Returns the current date and time.
Definition: FFaAppInfo.C:143