|
From: Stuart R. <st...@Cs...> - 2004-04-07 12:24:48
|
> In fact, this method fits definitely for the other parser classes as
> well.. You do need to add the channels and channel-length to the method I
> guess:
> virtual int read_line(char *line, DataCell* channels, uint numchannels)=0;
> so the method directly returns the channels in one go, right?
Hmm... What I was thinking was that you might want to do something like
this:
LogFileReader *l = new LogFileReader("datafile");
NMEAParser *p = new NMEAParser();
while (blah) {
// Get the current line
char *line;
if (l->read_line(line);
// Parse it
p->parse_sentence(channels, numchannels, line);
...
}
...
}
Putting the channels and numchannels into read_line would be redundant
since all we're getting out of it is an unparsed string. No?
later,
Stuart
---
digimail: st...@tr...
electromagic-interweb: http://www.cs.nott.ac.uk/~str
|