Is there a way to set up a source so that it automatically does a Pump
as needed? I want to be able to use Get and if there is not data to Get,
then do a Pump. Take the following code snippet:
FileSource fileSource("foobar", false);
byte buf[1000];
unsigned int len = fileSource.Get(buf, sizeof(buf));
As written this will fail because nothing has been made available to
'Get'. If I add the following line after creating the FileSource it will
work:
fileSource.Pump(sizeof(buf));
I know that I can do a 'Pump' as needed, but I am passing the FileSource
(and StreamTransformationFilter) around using BufferedTransformation
references which do not have access to the function 'Pump'.
Is there a better way to do this? That is to allow me to read (Get) from
a source?
Brad.