Refactor for testing interactive selection input
[alexxy/gromacs.git] / src / gromacs / selection / scanner.h
index ad7fcf56ce3e33a90ec1e620803edb1bdc5bd388..b918ccc5fd375f9266eb75d7a7f3378505bbfef1 100644 (file)
 
 #include "parser.h"
 
+namespace gmx
+{
+class TextWriter;
+}
+
 struct gmx_ana_indexgrps_t;
 struct gmx_ana_selcollection_t;
 
@@ -62,7 +67,7 @@ typedef void *yyscan_t;
 /** Initializes the selection scanner. */
 void
 _gmx_sel_init_lexer(yyscan_t *scannerp, struct gmx_ana_selcollection_t *sc,
-                    bool bInteractive, int maxnr, bool bGroups,
+                    gmx::TextWriter *statusWriter, int maxnr, bool bGroups,
                     struct gmx_ana_indexgrps_t *grps);
 /** Frees memory allocated for the selection scanner. */
 void
@@ -77,9 +82,9 @@ _gmx_sel_lexer_set_exception(yyscan_t                    scanner,
 void
 _gmx_sel_lexer_rethrow_exception_if_occurred(yyscan_t scanner);
 
-/** Returns true if the scanner is interactive. */
-bool
-_gmx_sel_is_lexer_interactive(yyscan_t scanner);
+/** Returns writer for status output (if not NULL, the scanner is interactive). */
+gmx::TextWriter *
+_gmx_sel_lexer_get_status_writer(yyscan_t scanner);
 /** Returns the selection collection for the scanner. */
 struct gmx_ana_selcollection_t *
 _gmx_sel_lexer_selcollection(yyscan_t scanner);