From: Noel O'B. <bao...@gm...> - 2007-01-30 08:04:54
|
Some thoughts: The final conversion of attributes to arrays may be different in each case, and so cannot be shared across parsers. Any additional shared code, e.g. final progress update, should be called from the end of the .parse(), rather than having the user call it. On 29/01/07, Karol Langner <kar...@kn...> wrote: > It occurred to me that it might be beneficial to have two functions in the > LogFile class that should be called before and after logfiles of any type are > parsed. For instance, when working the GAMESS parser, I saw there was no > final progress update and conversion of attributes to arrays. With these > functions, that won't happen for any new parsers, changes can be made for all > of them in one place, and the code will be clearer. > > Basically, everything in the parse() function of a parser before the "for line > in inputfile" loop would go i nthe first function, and everything after in > the second. As far as I can tell, there are no differences here between > parsers, so is there a reason not to do this? > > To do this, however, inputfile, nstep, and oldstep (maybe something else, > also?) need to be parser attributes. > > If this seems like a good idea, I'd be happy to do the necessary changes in a > few days. > > Karol > > -- > written by Karol Langner > Tue Jan 30 00:26:31 CET 2007 > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > cclib-devel mailing list > ccl...@li... > https://lists.sourceforge.net/lists/listinfo/cclib-devel > |