X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Futility%2Ftextreader.h;h=62607c6499bebb7e11337eaf67d2c6cb6c972ffe;hb=1d597ac0415f9a847715ef65daa55fe1312bd59f;hp=0310f1a0618c847b965103a51a797ab4b4b2b606;hpb=8bb9e38caa59684b3731a434a603c78beaf9a87a;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/utility/textreader.h b/src/gromacs/utility/textreader.h index 0310f1a061..62607c6499 100644 --- a/src/gromacs/utility/textreader.h +++ b/src/gromacs/utility/textreader.h @@ -67,6 +67,18 @@ namespace gmx class TextReader { public: + /*! \brief + * Reads contents of a file to a std::string. + * + * \param[in] filename Name of the file to read. + * \returns The contents of \p filename. + * \throws std::bad_alloc if out of memory. + * \throws FileIOError on any I/O error. + */ + static std::string readFileToString(const char *filename); + //! \copydoc readFileToString(const char *) + static std::string readFileToString(const std::string &filename); + /*! \brief * Creates a reader that reads from specified file. *