#ifndef GTGEN_USER_ABORT_H
#define GTGEN_USER_ABORT_H

/**
 * Indicator of user requested abort, which is recognized when
 * there \b DOES \b NOT \b exist a file called \e file in the current working directory.
 *
 * The routine performs check for the presence of this file. If it is
 * \b NOT \b found and \e stop is true, it throws a 'user requested interrupt' exception.
 *
 * Actually, the routine tries to open the file for read-only access.
 * The content of the file is not modifed at all.
 *
 * \param[in] file	the name of the file to be checked
 * \param[in] stop	whether the routine should also stop
 *
 * \return Returns true if detected user's wish to stop.
 */
bool UserAbort(const char *file, const bool stop=true);

#endif
