/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
namespace gmx
{
+class FileInputRedirectorInterface;
class FileNameOptionInfo;
class Options;
FileNameOptionManager();
virtual ~FileNameOptionManager();
+ /*! \brief
+ * Redirects file existence checks.
+ *
+ * \param[in] redirector File redirector to use for existence checks.
+ *
+ * The manager checks for existence of various files on the file system
+ * to complete file extensions. This method can be used to redirect
+ * those checks to an alternative implementation.
+ *
+ * This is used for unit tests to more easily control the result of the
+ * checks and to keep the tests as fast as possible by avoiding real
+ * file system access. To keep implementation options open, behavior
+ * with `redirector == NULL` is undefined and should not be relied on.
+ * For tests, there should only be need to call this a single time,
+ * right after creating the manager.
+ */
+ void setInputRedirector(const FileInputRedirectorInterface *redirector);
+
/*! \brief
* Disables special input file option handling.
*