Gromacs
2018.1
|
#include <gromacs/utility/datafilefinder.h>
Search parameters for DataFileFinder.
This class implements a named parameter idiom for DataFileFinder::findFile() and DataFileFinder::openFile() to support an easily readable and customizable way of searching data files.
By default, the search first considers the current directory, followed by specified and default data directories, and an exception is thrown if the file could not be found. To skip searching in the current directory, use includeCurrentDir().
Methods in this class do not throw.
Public Member Functions | |
DataFileOptions (const char *filename) | |
Constructs default options for searching for a file with the specified name. More... | |
DataFileOptions (const std::string &filename) | |
Constructs default options for searching for a file with the specified name. More... | |
DataFileOptions & | includeCurrentDir (bool bInclude) |
Sets whether to search in the current (working) directory. | |
DataFileOptions & | throwIfNotFound (bool bThrow) |
Sets whether an exception is thrown if the file could not be found. | |
Friends | |
class | DataFileFinder |
Needed to access the members without otherwise unnecessary accessors. | |
|
inline |
Constructs default options for searching for a file with the specified name.
[in] | filename | File name to search for. |
This constructor is not explicit to allow passing a simple string to DataFileFinder methods to search for the string with the default parameters.
|
inline |
Constructs default options for searching for a file with the specified name.
[in] | filename | File name to search for. |
This constructor is not explicit to allow passing a simple string to DataFileFinder methods to search for the string with the default parameters.