Change-Id: Ia2b7753991ffbb6b1f80bd0dcbdf81af9271a69b
{
}
+StringInputStream::StringInputStream(const std::vector<std::string> &input)
+ : input_(joinStrings(input.begin(), input.end(), "\n")), pos_(0)
+{
+ input_.append("\n");
+}
+
StringInputStream::StringInputStream(ConstArrayRef<const char *> const &input)
: input_(joinStrings(input.begin(), input.end(), "\n")), pos_(0)
{
#define GMX_UTILITY_STRINGSTREAM_H
#include <string>
+#include <vector>
#include "gromacs/utility/textstream.h"
* \param[in] input String to be served by the stream.
*/
explicit StringInputStream(const std::string &input);
+ /*! \brief
+ * Constructor that stores input lines in a string.
+ *
+ * The vector of strings is stored as a string separated by newline.
+ *
+ * \param[in] input String to be served by the stream.
+ */
+ explicit StringInputStream(const std::vector<std::string> &input);
/*! \brief
* Constructor that stores input lines in a string.
*