Add StringFormatter and formatAndJoin to stringutil
authorMark Abraham <mark.j.abraham@gmail.com>
Sun, 18 May 2014 10:48:46 +0000 (12:48 +0200)
committerRoland Schulz <roland@utk.edu>
Fri, 12 Dec 2014 19:57:19 +0000 (14:57 -0500)
commitd643171b854f1f43afda2fe96febb7b385684165
tree7d20af6d6d309326bbbf141db1996efb90d9bfa2
parent6f3a357bae2560549e35d963be3a643a0e31e002
Add StringFormatter and formatAndJoin to stringutil

The StringFormatter functor wraps formatString so that we can write
one-liners that take a container, format its objects to strings, and
join them with a separator into one string for e.g. logging output.

Re-implemented joinString in terms of formatAndJoin, by using an
IdentitfyFormatter, thus eliminating duplication of implementation.

Added some tests for joinString also.

Applied new functionality to reporting GPU status information.

Change-Id: I424543a1ca4e214c438cc39f104f087e7e70030a
src/gromacs/gmxlib/gmx_detect_hardware.cpp
src/gromacs/utility/stringutil.h
src/gromacs/utility/tests/stringutil.cpp