Refactor for testing interactive selection input
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 29 Jun 2015 04:58:04 +0000 (07:58 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sat, 4 Jul 2015 14:57:27 +0000 (16:57 +0200)
commit180cf1538ad2b19bd6b4108662adc4a519565fcb
treea274cebcab66f9bf5401dd63d07688d6e9a114c3
parent1d597ac0415f9a847715ef65daa55fe1312bd59f
Refactor for testing interactive selection input

Introduce a parseInteractive() method that works otherwise as
parseFromStdin(), except that the caller can provide alternative
streams for input and status output.  Make all input and output use
these streams instead of stdin or stderr directly.  Unit tests using
this will be added separately.

There is slight regression in the formatting of errors during
interactive selection input (noted in TODO in exceptions.cpp), but that
will be resolved separately to keep the commits smaller.

Change-Id: I0b6b885621c81a5e526b5f93b40d32b9248626f1
15 files changed:
src/gromacs/selection/indexutil.cpp
src/gromacs/selection/indexutil.h
src/gromacs/selection/parsetree.cpp
src/gromacs/selection/scanner.cpp
src/gromacs/selection/scanner.h
src/gromacs/selection/scanner.l
src/gromacs/selection/scanner_internal.cpp
src/gromacs/selection/scanner_internal.h
src/gromacs/selection/selection.cpp
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/selectioncollection.h
src/gromacs/utility/exceptions.cpp
src/gromacs/utility/exceptions.h
src/gromacs/utility/textwriter.cpp
src/gromacs/utility/textwriter.h