Hi Pavol, > I have a request regarding config file support in the program option > library. Currently when the parser encounters an unknown option in the > config file, parsing is stopped with an exception. > Together with fixed option definition, this feature disables a possibility > to have an arbitrary options in the config file, whose exact format is > not know prior to parsing. > > An example: > > I'd like to have something like this in the config file > > <conf-file> > > [module] > > file-count = 3 > > file-name1 = 001.aaa > file-name2 = 002.aaa > file-name3 = 003.aaa > > </conf-file> > > > where the number of file-name* lines is not know before parsing, and it is > up to user to specify as many as she wants, or the format and number of > options is dependant on some other option ( i.e. file-count ) > > I think, that it would be nice to be able to force the parser to accept > also the options not described in the option_descriptions and have a way > to work with them.
In fact, there's a (undocumented) feature which applies to your case: desc.add_options() ("file-name*", ....) After this, every option starting with "file-name" will be accepted. Is this appropriate for your use case? - Volodya _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost