On 30/06/2010 15:07, Noel O'Boyle wrote: > According to the webs, there's getopt and there's boost::program_options. > > I think that both Chris and I (at least) think that most of these > tools such be incorporated into babel (or obabel) as operations. > > On 30 June 2010 14:54, Tim Vandermeersch<tim.vandermeer...@gmail.com> wrote: >> Currently all commandline tools implement argument parsing on their >> own. Apart from code duplication this is also prone to errors (babel >> is probably ok, the other tools could use improvement). >> >> Does anyone know good candidate libraries to do this? They should be >> cross-platform and ideally be some header files we can embed.
As Noel says, I think using the babel (or preferably obabel) interface has advantage. You don't have to worry about what formats you can input or output, file error handling, selection of molecules from multi-molecule files, implicit/explicit hydrogens, etc. With obabel, option handling is improved, with multiple and default parameters possible on options. There is still a need to parse option strings but there will be fewer of them. Generally, options on babel are not very beautiful and in an ideal world a complete redesign might be nice, but a tool from the same stable would really want to use a similar style to babel. Having the functionality in a plugin op gives the same independence as a standalone tool, but in simpler cases is accessible from the GUI as well as the commandline, and allows the programatic access from the main API. Chris ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel