3 /// Connector class to join parsers and builders together
7 Copyright (C) 2010-2012, Net Direct Inc. (http://www.netdirect.ca/)
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU General Public License in the COPYING file at the
19 root directory of this project for more details.
22 #ifndef __BARRY_PIPE_H__
23 #define __BARRY_PIPE_H__
34 /// Reads data from a builder and feeds it into a parser.
43 explicit Pipe(Builder
&builder
);
46 /// Access the builder... mostly useful for finding out
47 /// the database name for the next series, if using multiple
49 const Builder
& GetBuilder() const { return m_builder
; }
51 /// Reads one item from the builder and feeds it into the parser
52 /// and returns the builder Retrieve status.
53 bool PumpEntry(Parser
&parser
, const IConverter
*ic
= 0);
55 /// Reads all items from builder, feeding them into the parser,
56 /// until the builder's Retrieve() signals the end of the series.
57 void PumpSeries(Parser
&parser
, const IConverter
*ic
= 0);
59 /// Reads all series from the builder, feeding them into the parser,
60 /// until the builder's EndOfFile() is true.
61 void PumpFile(Parser
&parser
, const IConverter
*ic
= 0);