Gromacs  2024.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
cmdlineprogramcontext.cpp File Reference
#include "gmxpre.h"
#include "cmdlineprogramcontext.h"
#include "config.h"
#include <cstdlib>
#include <cstring>
#include <filesystem>
#include <mutex>
#include <string>
#include <vector>
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/path.h"
#include "gromacs/utility/stringutil.h"
#include "buildinfo.h"
+ Include dependency graph for cmdlineprogramcontext.cpp:

Description

Implements gmx::CommandLineProgramContext.

See developer guide section on relocatable binaries for explanation of the searching logic.

Author
Teemu Murtola teemu.nosp@m..mur.nosp@m.tola@.nosp@m.gmai.nosp@m.l.com

Classes

class  gmx::anonymous_namespace{cmdlineprogramcontext.cpp}::DefaultExecutableEnvironment
 Default implementation for IExecutableEnvironment. More...
 

Functions

std::string gmx::anonymous_namespace{cmdlineprogramcontext.cpp}::quoteIfNecessary (const char *str)
 Quotes a string if it contains spaces.
 
std::filesystem::path gmx::anonymous_namespace{cmdlineprogramcontext.cpp}::findFullBinaryPath (const std::filesystem::path &invokedName, const IExecutableEnvironment &env)
 Finds the absolute path of the binary from argv[0]. More...
 
bool gmx::anonymous_namespace{cmdlineprogramcontext.cpp}::isAcceptableLibraryPath (const std::filesystem::path &path)
 Returns whether given path contains files from share/top/. More...
 
bool gmx::anonymous_namespace{cmdlineprogramcontext.cpp}::isAcceptableLibraryPathPrefix (const std::filesystem::path &path)
 Returns whether given path prefix contains files from share/top/. More...
 
std::filesystem::path gmx::anonymous_namespace{cmdlineprogramcontext.cpp}::findFallbackInstallationPrefixPath ()
 Returns a fallback installation prefix path. More...
 
std::filesystem::path gmx::anonymous_namespace{cmdlineprogramcontext.cpp}::findInstallationPrefixPath (const std::filesystem::path &binaryPath, bool *bSourceLayout)
 Generic function to find data files based on path of the binary. More...